Closed Bug 1843973 Opened 2 years ago Closed 2 years ago

Do not root CompilationInput in DelazifyCanonicalScriptedFunctionImpl

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(1 file)

In FrontendContext variant of delazification, CompilationInput doesn't contain any GC pointer and it doesn't need tracing.

https://searchfox.org/mozilla-central/rev/7a4c08f2c3a895c9dc064734ada320f920250c1f/js/src/frontend/BytecodeCompiler.cpp#1392

Rooted<CompilationInput> input(cx, CompilationInput(options));

we could do in the same way as CompilationStorage, but without allocating it on heap.

https://searchfox.org/mozilla-central/rev/7a4c08f2c3a895c9dc064734ada320f920250c1f/js/public/experimental/CompileScript.h#98,104

struct CompilationStorage {
...
  JS_HAZ_NON_GC_POINTER js::frontend::CompilationInput* input_ = nullptr;
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/62bbf798e78d Do not root CompilationInput in DelazifyCanonicalScriptedFunctionImpl. r=nbp
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: