Allow multiple JS::Stencil instantiations while source-compression is pending
Categories
(Core :: JavaScript Engine, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox89 | --- | fixed |
People
(Reporter: tcampbell, Assigned: tcampbell)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
When we try to use a JS::Stencil
multiple times (such as for future Bug 1670403), we risk trying to trigger source compression while an existing compression is pending which trips our consistency checks.
A simple workaround might be to add an additional flag to ScriptSource
to indicate the compression has already been attempted.
Assignee | ||
Comment 1•4 years ago
|
||
If a Stencil is re-used while a SourceCompressionTask was pending we would
previously risk creating a second task which would race. To avoid this, this
patch tracks that a SourceCompressionTask has already been issued and
creating another. Existing use-case in the browser do not reuse Stencil so
this is not a problem yet, but we intend to soon so this must be fixed.
If the original source-compression failed (such as because OOM), later
instantiations will not retry. Compression is optional and the single-user
case does not offer a good story here, so I think this is fine.
Comment 3•4 years ago
|
||
bugherder |
Description
•