Closed
Bug 774706
Opened 13 years ago
Closed 13 years ago
weird dead xpc_UnmarkGrayScript floating around in nsJSContext::Serialize
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla17
People
(Reporter: luke, Assigned: Benjamin)
Details
Attachments
(1 file, 1 obsolete file)
1018 bytes,
patch
|
mccr8
:
review+
|
Details | Diff | Splinter Review |
Go figure:
http://mxr.mozilla.org/mozilla-central/source/dom/base/nsJSEnvironment.cpp#1984
Related question: do we ever call this function? It ends up being 1 of 2 uses of JS engine XDR, so it would be awesome if we could kill it...
Comment 1•13 years ago
|
||
![]() |
Reporter | |
Comment 2•13 years ago
|
||
I see. bz: do you know how that stream serialization relates to the startup cache?
![]() |
||
Comment 3•13 years ago
|
||
Pretty directly, last I checked: the result is what's stored in the startup cache.
![]() |
Reporter | |
Comment 4•13 years ago
|
||
Interesting, so is this for a set of scripts disjoint from those XDR'd via (Read|Write)CachedScript (by mozJSComponentLoader::GlobalForLocation and mozJSSubScriptLoader::LoadSubScript) ?
![]() |
||
Comment 5•13 years ago
|
||
Yes, this is for <script> tags in XUL documents. Specifically for inline <script>s, for the callsite linked in comment 1, I believe.
![]() |
Reporter | |
Comment 6•13 years ago
|
||
Ah, thanks for explaining. Would you say that <script> tags are the majority (size-wise) of XDR'd scripts?
![]() |
||
Comment 7•13 years ago
|
||
I would think not, because the inline scripts should generally be small (and perhaps even rare) and <script src> uses a different codepath here, right?
We could measure, if desired.
![]() |
Reporter | |
Comment 8•13 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #7)
Ah, good to hear; we'll measure. (This is all in the context of removing the decompiler and bug 761723.)
Assignee | ||
Comment 9•13 years ago
|
||
Going back to the original bug.
Assignee: nobody → bpeterson
Attachment #649684 -
Flags: review?(luke)
![]() |
Reporter | |
Comment 10•13 years ago
|
||
Comment on attachment 649684 [details] [diff] [review]
kill dead xpc thing
Removing them is one option, but I assume it was put here for a reason:
http://hg.mozilla.org/mozilla-central/rev/defb50779980
Steve?
Attachment #649684 -
Flags: review?(luke) → review?(sphink)
Assignee | ||
Comment 11•13 years ago
|
||
Perhaps smaug can comment.
Comment 12•13 years ago
|
||
The question is, what does WriteScript do with aScriptObject? If it can create any new references to aScriptObject anywhere in the heap, then we need to do an xpc_UnmarkGrayScript() before we do WriteScript.
Comment 13•13 years ago
|
||
I don't know what WriteScript does... but looks like it ends up calling
JS_EncodeInterpretedFunction or JS_EncodeScript.
Assignee | ||
Comment 14•13 years ago
|
||
I don't believe JS_EncodeScript currently can keep extra references around. Maybe it would be safer to retain the xpc_UnmarkGrayScript just in case.
Comment 15•13 years ago
|
||
That would be the easiest thing to do. I can't imagine the overhead of a function call will impact performance much here.
Assignee | ||
Comment 16•13 years ago
|
||
Attachment #649684 -
Attachment is obsolete: true
Attachment #649684 -
Flags: review?(sphink)
Attachment #649741 -
Flags: review?(continuation)
Comment 17•13 years ago
|
||
Comment on attachment 649741 [details] [diff] [review]
fix dead code
Review of attachment 649741 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks.
Attachment #649741 -
Flags: review?(continuation) → review+
Assignee | ||
Comment 18•13 years ago
|
||
Comment 19•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•