mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibJS: Do not verify cycle root's status is linked in CyclicModule
This VERIFY is both incorrect and redundant. The VERIFY at step 2 verifies the status when evaluate is called on m_cycle_root.
This commit is contained in:
parent
61c36e2865
commit
e93f44112d
|
|
@ -344,7 +344,6 @@ ThrowCompletionOr<GC::Ref<Promise>> CyclicModule::evaluate(VM& vm)
|
|||
if ((m_status == ModuleStatus::EvaluatingAsync || m_status == ModuleStatus::Evaluated) && m_cycle_root != this) {
|
||||
// Note: This will continue this function with module.[[CycleRoot]]
|
||||
VERIFY(m_cycle_root);
|
||||
VERIFY(m_cycle_root->m_status == ModuleStatus::Linked);
|
||||
dbgln_if(JS_MODULE_DEBUG, "[JS MODULE] evaluate[{}](vm) deferring to cycle root at {}", this, m_cycle_root.ptr());
|
||||
return m_cycle_root->evaluate(vm);
|
||||
}
|
||||
|
|
|
|||
3
Tests/LibWeb/Crash/JS/cyclic-async-module-a.mjs
Normal file
3
Tests/LibWeb/Crash/JS/cyclic-async-module-a.mjs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import { foo } from "./cyclic-async-module-b.mjs";
|
||||
|
||||
await new Promise(resolve => setTimeout(resolve, 200));
|
||||
3
Tests/LibWeb/Crash/JS/cyclic-async-module-b.mjs
Normal file
3
Tests/LibWeb/Crash/JS/cyclic-async-module-b.mjs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import "./cyclic-async-module-a.mjs";
|
||||
|
||||
export const foo = "value from B";
|
||||
2
Tests/LibWeb/Crash/JS/cyclic-async-module.html
Normal file
2
Tests/LibWeb/Crash/JS/cyclic-async-module.html
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="./cyclic-async-module.mjs"></script>
|
||||
7
Tests/LibWeb/Crash/JS/cyclic-async-module.mjs
Normal file
7
Tests/LibWeb/Crash/JS/cyclic-async-module.mjs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
(async function () {
|
||||
const first = import("./cyclic-async-module-a.mjs");
|
||||
const second = import("./cyclic-async-module-b.mjs");
|
||||
|
||||
await first;
|
||||
await second;
|
||||
})();
|
||||
Loading…
Reference in New Issue
Block a user