deno
7401b517 - core+qjs_v8_compat: guard lazy_load_esm_module re-eval with esm_bytecode_consumed_for

Commit
78 days ago
core+qjs_v8_compat: guard lazy_load_esm_module re-eval with esm_bytecode_consumed_for Add a public esm_bytecode_consumed_for(Local<Module>) hook in qjs_v8_compat::v8::module that lets deno_core skip the handle_local.evaluate(scope) call in lazy_load_esm_module when QuickJS has already evaluated the module's bytecode (eager link via JS_EvalFunction). Re-evaluating the same bytecode JSValue would trip refcount tracking and observe partial state. The guard is paired with the existing mark_all_esm_bytecode_consumed sweep in Module::evaluate's post-eval section. It's currently a no-op for the in-flight recursive lazy_load case (the sweep hasn't fired yet when the cycle starts) but lays groundwork for finer-grained "currently being evaluated" tracking and is compiled-in for the post-evaluate paths to be safe.
Author
Parents
Loading