Closed Bug 1718529 Opened 3 years ago Closed 3 years ago

Use JS_ExecuteScript instead of JS::CloneAndExecuteScript in EvalStencil and mozJSComponentLoader::ObjectForLocation

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(3 files)

After bug 1688788, mozJSComponentLoader::ObjectForLocation and EvalScript instantiates the script just before calling JS::CloneAndExecuteScript, that means it doesn't have to clone.
we can use JS_ExecuteScript instead, so that remaining non-testing JS::CloneAndExecuteScript callsites are all removed.

Attachment #9233807 - Attachment description: WIP: Bug 1718529 - Part 1: Use JS_ExecuteScript instead of JS::CloneAndExecuteScript when same-realm is guaranteed. r?tcampbell! → Bug 1718529 - Part 1: Use JS_ExecuteScript instead of JS::CloneAndExecuteScript when same-realm is guaranteed. r?tcampbell!
Attachment #9233808 - Attachment description: WIP: Bug 1718529 - Part 2: Remove cloneAndExecuteScript testing function. r?tcampbell! → Bug 1718529 - Part 2: Remove cloneAndExecuteScript testing function. r?tcampbell!
Attachment #9233809 - Attachment description: WIP: Bug 1718529 - Part 3: Remove JS::CloneAndExecuteScript. r?tcampbell! → Bug 1718529 - Part 3: Remove JS::CloneAndExecuteScript. r?tcampbell!
Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/autoland/rev/cf2422a4cf0b
Part 1: Use JS_ExecuteScript instead of JS::CloneAndExecuteScript when same-realm is guaranteed. r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/51a0210ff990
Part 2: Remove cloneAndExecuteScript testing function. r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/506b2659c7f9
Part 3: Remove JS::CloneAndExecuteScript. r=tcampbell
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: