Rewrite nsXULPrototypeScript / nsXULPrototypeCache with stencil
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox94 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(2 files)
nsXULPrototypeScript
/ nsXULPrototypeCache
uses JSScript
as a cache for JS::CompileOffThread
/JS::Compile
result.
they holds the result both on memory and in file (nsIXPConnect::{ReadScript,WriteScript}
)
rewriting them with stencil removes JS::CloneAndExecuteScript
call in PrototypeDocumentContentSink::ExecuteScript
and partially unblocks bug 1662152.
JS::CloneAndExecuteScript
in PrototypeDocumentContentSink::ExecuteScript
always clones, so using stencil instead and instantiating there won't regress much.
Assignee | ||
Comment 1•4 years ago
|
||
Depends on D118832
Updated•3 years ago
|
Comment 3•3 years ago
|
||
Backed out for causing leaks.
Backout link: https://hg.mozilla.org/integration/autoland/rev/67b1f53e79bbd755fb285606dcd246b5ae131295
Failure log: https://treeherder.mozilla.org/logviewer?job_id=351989321&repo=autoland&lineNumber=3022
Comment 4•3 years ago
|
||
Backout merged to central: https://hg.mozilla.org/mozilla-central/rev/67b1f53e79bbd755fb285606dcd246b5ae131295
Comment 6•3 years ago
|
||
bugherder |
Assignee | ||
Updated•3 years ago
|
Comment 7•3 years ago
|
||
== Change summary for alert #31422 (as of Tue, 21 Sep 2021 12:28:43 GMT) ==
Improvements:
Ratio | Test | Platform | Options | Absolute values (old vs new) |
---|---|---|---|---|
5% | JS | windows10-64-2004-shippable-qr | fission tp6 | 244,981,923.50 -> 233,097,527.06 |
For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=31422
Comment 8•3 years ago
|
||
The changes introduced in this bug cause Firefox to crash, if WebExtension Experiments flush the cash using:
Services.obs.notifyObservers(null, "startupcache-invalidate", null);
This method has been working before and is the only supported and "preferred" way to do it. See instructions given in https://bugzilla.mozilla.org/show_bug.cgi?id=703720#c0
Crash observed on Windows 10.
Steps to reproduce:
- Set
xpinstall.signatures.required
tofalse
- Set
extensions.experiments.enabled
totrue
- Restart Firefox (to make sure the changed config is picked up)
- Install the attached add-on
- Wait 10 seconds
- Disable the add-on in Add-ons Manager
- Wait 10 seconds (until the add-on is moved to the "Disabled" section)
- Open Hamburger Menu -> Settings/Preferences
- Observe Firefox crash.
Assignee | ||
Comment 9•3 years ago
|
||
copied it to bug 1736039
Description
•