Check input CompileOptions when decoding, or getting from cache
Categories
(Core :: JavaScript Engine, task, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox83 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
(Blocks 1 open bug)
Details
Attachments
(12 files, 1 obsolete file)
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review |
| Assignee | ||
Comment 1•5 years ago
|
||
| Assignee | ||
Comment 2•5 years ago
|
||
Depends on D90585
| Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 3•5 years ago
|
||
Probably want all the "input" flags listed here https://searchfox.org/mozilla-central/rev/f21850ca45036ddb84cd25aa355a6969d7c94c4f/js/src/frontend/SharedContext.cpp#56-67
| Assignee | ||
Comment 4•5 years ago
|
||
In ScriptLoader, same CompileOption is passed to both JS::Compile and JS::DecodeScriptMaybeStencil.
but in other places, callers aren't passing same CompileOption as JS::Compile to decoding API.
JS::DecodeScriptdoesn't receiveCompileOptions.JS::DecodeMultiOffThreadScriptsreceivesCompileOptions, but the option is shared across multiple scripts that can be compiled with different options
and in remaining consumers, the decoded script is stored into cache and used later, and compilation happens when the cache isn't found.
It means we should check CompileOptions vs ImmutableScriptFlags when getting from the cache, instead of when decoding.
I'll add an API that checks CompileOptions vs ImmutableScriptFlags, for existing consumers.
once we replace the cache to store stencil, we can compare CompileOptions directly between cache and compilation input.
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 5•5 years ago
|
||
plan:
- for
JS::DecodeScript, addCompileOptionsparameter and modify the consumer to pass the same options asJS::Compile, and check the options vs flags internally - for
JS::DecodeMultiOffThreadScripts, modify the consumers to pass options that is consistent as much as possible (but still not all options can be same), and check some options vs flags internally - for
JS::DecodeMultiOffThreadScriptsconsumers, when getting a decoded script from the cache, make it receiveCompileOptionsand check options vs flags
| Assignee | ||
Comment 6•5 years ago
|
||
| Assignee | ||
Comment 7•5 years ago
|
||
This adds the parameter, without using it, also without passing the correct
value.
The later patch will change the consumer of those API to pass the correct value,
and then use the passed parameter.
Depends on D92403
| Assignee | ||
Comment 8•5 years ago
|
||
Depends on D92404
| Assignee | ||
Comment 9•5 years ago
|
||
Depends on D92405
| Assignee | ||
Comment 10•5 years ago
|
||
Depends on D92406
| Assignee | ||
Comment 11•5 years ago
|
||
Depends on D92407
| Assignee | ||
Comment 12•5 years ago
|
||
Depends on D92408
| Assignee | ||
Comment 13•5 years ago
|
||
Depends on D92409
| Assignee | ||
Comment 14•5 years ago
|
||
Depends on D92410
| Assignee | ||
Comment 15•5 years ago
|
||
Depends on D92411
| Assignee | ||
Comment 16•5 years ago
|
||
Depends on D92412
| Assignee | ||
Comment 17•5 years ago
|
||
Depends on D92413
Updated•5 years ago
|
Comment 18•5 years ago
|
||
Comment 19•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/c5f2032ed919
https://hg.mozilla.org/mozilla-central/rev/a6da1179a589
https://hg.mozilla.org/mozilla-central/rev/777c94a3c977
https://hg.mozilla.org/mozilla-central/rev/3014569a17c7
https://hg.mozilla.org/mozilla-central/rev/8ecde54fab31
https://hg.mozilla.org/mozilla-central/rev/483e81a2dbd7
https://hg.mozilla.org/mozilla-central/rev/3e4b7122f576
https://hg.mozilla.org/mozilla-central/rev/50cd482cdb64
https://hg.mozilla.org/mozilla-central/rev/5a6df8bb1ab5
https://hg.mozilla.org/mozilla-central/rev/240b2e7d6afc
https://hg.mozilla.org/mozilla-central/rev/2fbbdd37bb54
https://hg.mozilla.org/mozilla-central/rev/8827caa78683
Description
•