Last Comment Bug 716004 - Traverse nsXBLDocumentInfo less often
: Traverse nsXBLDocumentInfo less often
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: XBL (show other bugs)
: 12 Branch
: All All
-- normal (vote)
: ---
Assigned To: Olli Pettay [:smaug] (pto-ish for couple of days)
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks: 716598
  Show dependency treegraph
 
Reported: 2012-01-06 12:13 PST by Olli Pettay [:smaug] (pto-ish for couple of days)
Modified: 2012-01-13 05:29 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (1.77 KB, patch)
2012-01-06 12:13 PST, Olli Pettay [:smaug] (pto-ish for couple of days)
continuation: review+
jst: review+
Details | Diff | Splinter Review

Description User image Olli Pettay [:smaug] (pto-ish for couple of days) 2012-01-06 12:13:17 PST
Created attachment 586508 [details] [diff] [review]
patch

Keep similar behavior to rest of DOM to traverse script objects,
but don't traverse anything else.
If mDocument is in generation, so is then nsXBLDocumentInfo
(owned by xul cache).
Comment 1 User image Andrew McCreight [:mccr8] 2012-01-06 12:24:43 PST
Is there some specific reason you are concerned about moving around script traversal or are you just being safe?

The code looks fine to me, but I don't know anything about nsXBLDocumentInfo, so you should get somebody else to confirm that mDocument always holds the nsXBLDocumentInfo alive.
Comment 2 User image Andrew McCreight [:mccr8] 2012-01-06 15:01:17 PST
I talked to jst about this a little, and he said that these objects aren't guaranteed to be in the XUL cache.  Or rather, they are in the browser as is, but somebody could configure non-browser usage (or something like that?) so they wouldn't be.
Comment 3 User image Olli Pettay [:smaug] (pto-ish for couple of days) 2012-01-07 05:36:02 PST
The objects are in XUL cache if they are in CC generation. This relies on the behavior
of https://bugzilla.mozilla.org/show_bug.cgi?id=713865.
Comment 4 User image Andrew McCreight [:mccr8] 2012-01-07 08:11:33 PST
Ah, yes, that makes sense.
Comment 5 User image Johnny Stenback (:jst, jst@mozilla.com) 2012-01-07 10:50:13 PST
Is that true even for non-chrome XBL documents? I.e. if a user explicitly enables remote XBL for a given site?
Comment 6 User image Olli Pettay [:smaug] (pto-ish for couple of days) 2012-01-07 11:00:20 PST
If those aren't in XUL cache, document's aren't marked to be in CC generation.
Comment 7 User image Olli Pettay [:smaug] (pto-ish for couple of days) 2012-01-07 11:01:15 PST
...see the patch for bug 713865.
Comment 8 User image Johnny Stenback (:jst, jst@mozilla.com) 2012-01-07 11:04:22 PST
Good point.
Comment 9 User image Olli Pettay [:smaug] (pto-ish for couple of days) 2012-01-13 05:29:41 PST
https://hg.mozilla.org/mozilla-central/rev/790cd9bba7f5

Note You need to log in before you can comment on or make changes to this bug.