Closed
Bug 1392225
Opened 8 years ago
Closed 8 years ago
JSBC: Unability to serialize bytecode causes failures to continue the execution.
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla57
| Tracking | Status | |
|---|---|---|
| firefox57 | --- | fixed |
People
(Reporter: nbp, Assigned: nbp)
References
Details
Attachments
(1 file)
|
5.75 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
When running the eager mode of JSBC, the serialization fails on asm.js code.
We should do 2 thing:
- Prevent encoding failures from stopping the rest of the execution.
- Discard the incremental encoder when asm.js code is detected in the source.
I can reproduce this with:
$ mach mochitest \
--setpref dom.script_loader.bytecode_cache.strategy=-1 \
--setpref dom.script_loader.bytecode_cache.enabled=true \
dom/asmjscache/test/test_slow.html
Which ends with a timeout without running any of the asm.js test cases.
| Assignee | ||
Comment 1•8 years ago
|
||
The problem was simpler than expected, the xdtEncodeTopLevel function used
by the StartIncrementalEncoder jsapi function was reporting the equivalent
of an execution failure to the ScriptLoader.
This error prevented the execution of all scripts containing asm.js code
from ever running after the 5th visit, unless the user used Ctrl-Shift-R for
reloading without the cache.
This patch does 2 things:
- Add a short-cut to avoid allocating and iterating over tons of JSScript
if there is any asm.js code in the source.
- Fix the xdrEncodeTopLevel function, to only report allocation failures,
and no longer encoding failures.
Attachment #8899504 -
Flags: review?(luke)
Comment 2•8 years ago
|
||
Comment on attachment 8899504 [details] [diff] [review]
StartIncrementalEncoder should not report encoding failures.
Review of attachment 8899504 [details] [diff] [review]:
-----------------------------------------------------------------
Simple enough!
Attachment #8899504 -
Flags: review?(luke) → review+
| Assignee | ||
Updated•8 years ago
|
Status: NEW → ASSIGNED
Component: DOM → JavaScript Engine
Pushed by npierron@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ce67aec308e0
StartIncrementalEncoder should not report encoding failures. r=luke
Comment 4•8 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in
before you can comment on or make changes to this bug.
Description
•