Don't allow cloning scripts with different NonSyntactic flags
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox87 | --- | fixed |
People
(Reporter: tcampbell, Assigned: tcampbell)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
We currently allow the various CloneAndExecuteScript
APIs to be used to clone scripts when the flag does not match expected value. In practice, this leads to complex embedding behaviour so we should phase it out. The long term future is also to simply use Stencil representations instead of script cloning.
One particular case to watch for is the loadSubscript
API in privileged code and it's interaction with caches. This is not a concern though since we've already been partitioning that cache behaviour here https://searchfox.org/mozilla-central/rev/6bb59b783b193f06d6744c5ccaac69a992e9ee7b/js/xpconnect/loader/mozJSSubScriptLoader.cpp#89-93 .
Assignee | ||
Comment 1•3 years ago
|
||
Assert that uses of CloneAndExecuteScript
have a consistent NonSyntactic
flag. These APIs still perform cloning for the cross-realm cases. The shell
functions need small tweaks to support this invariant.
Assignee | ||
Updated•3 years ago
|
Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/29e0b1a86bf1 Don't allow cloning to change non-synactic flag. r=jandem
Comment 3•3 years ago
|
||
bugherder |
Description
•