Closed
Bug 941786
Opened 11 years ago
Closed 7 months ago
Disable saving source for chrome code
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: mccr8, Unassigned)
References
Details
(Whiteboard: [MemShrink:P3])
(Do workers actually have any chrome code?)
Comment 1•11 years ago
|
||
Given the reality of lazy script parsing, which is its own memory improvement (...at least relative to a world where we already save source for toString/toSource...I think?), I'm not sure this is actually possible any more. Or at least that's the tentative conclusion I reached when discussing disabling saved-source on b2g awhile back with nbp.
Comment 2•11 years ago
|
||
Right now I don't think we ever use lazy script parsing for chrome code.
Comment 3•11 years ago
|
||
The main problem is that addons like to use toString() on functions to dynamically patch them. Even in our tests, toString() and eval() are used for cheap metaprogramming. See toolkit/components/osfile/tests/mochi/test_osfile_comms.xul for an example usage in chrome workers. Perhaps turning off toString() for functions in chrome workers is a tractable task, though.
Reporter | ||
Comment 4•11 years ago
|
||
Our main interest here is reducing memory usage on B2G, so addon compatibility isn't a problem. But yeah this could break Gaia or tests or something.
Whiteboard: [MemShrink]
Comment 5•11 years ago
|
||
But gaia code doesn't run in a chrome context, does it? I guess I'm not exactly sure what the scope of this bug is.
Comment 6•11 years ago
|
||
Note also that bug 886193 might get bigger gains than this, if enabled for chrome code, too - and would only work if the source has been saved.
Updated•11 years ago
|
Whiteboard: [MemShrink] → [MemShrink:P3]
Comment 7•10 years ago
|
||
(In reply to Till Schneidereit [:till] from comment #6) > Note also that bug 886193 might get bigger gains than this, if enabled for > chrome code, too - and would only work if the source has been saved. Now that bug 886193 has landed, is this bug relevant any more?
Comment 8•10 years ago
|
||
(In reply to Nicholas Nethercote [:njn] from comment #7) > Now that bug 886193 has landed, is this bug relevant any more? Likely! Bug 944659 would make it even more so, however. That has its own share of potential problems with jank, though: see bug 944659, comment 59 and following.
Comment 9•10 years ago
|
||
(and by "likely!", I mean "probably not!" My reading comprehension seems to have been lacking when I replied ...)
Updated•10 years ago
|
Updated•2 years ago
|
Severity: normal → S3
Reporter | ||
Updated•7 months ago
|
Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•