Last Comment Bug 842710 - Identify TabChildGlobals in about:memory/compartment
: Identify TabChildGlobals in about:memory/compartment
Product: Core
Classification: Components
Component: DOM (show other bugs)
: unspecified
: x86_64 Linux
: -- normal (vote)
: mozilla22
Assigned To: Olli Pettay [:smaug]
: Andrew Overholt [:overholt]
Depends on:
  Show dependency treegraph
Reported: 2013-02-19 12:28 PST by Olli Pettay [:smaug]
Modified: 2013-03-09 02:00 PST (History)
4 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

patch (5.35 KB, patch)
2013-02-19 12:28 PST, Olli Pettay [:smaug]
justin.lebar+bug: review+
Details | Diff | Splinter Review

Comment 1 Justin Lebar (not reading bugmail) 2013-02-19 12:44:42 PST
It looks like this names the compartments as



We do system principal compartments as

  compartment([System Principal], http://foobar)

so perhaps we should stay in line with that and do something like

  compartment([In-process TabChild], http://foobar)

?  I bet njn has an opinion too.  :)
Comment 2 Olli Pettay [:smaug] 2013-02-19 12:46:28 PST
TabChildGlobal use system principal, so they should have [System Principal]
Comment 3 Olli Pettay [:smaug] 2013-02-19 12:48:10 PST
and http://... doesn't make sense. TabChildGlobals aren't really in any URL.
Some page may own the element which then owns the TabChildGlobal (in case of in-process).

But I can change the ID to whatever feels the best :)
I rarely use about:memory/compartment so I'm not really familiar with conventions there.
Comment 4 Justin Lebar (not reading bugmail) 2013-02-19 12:53:11 PST
So the current patch gives us

  compartment([System Principal], inProcessTabChildGlobal?ownedby=...)

Comment 5 Olli Pettay [:smaug] 2013-02-19 13:41:33 PST
[System Principal], inProcessTabChildGlobal?ownedBy=chrome://browser/content/browser.xul [3]
Comment 6 Nicholas Nethercote [:njn] 2013-02-19 13:47:54 PST
More specific naming of compartments is always good...

What name would these compartments have had before?

How likely is the case where there isn't an "ownedBy" part?
Comment 7 Olli Pettay [:smaug] 2013-02-19 13:56:36 PST
Before the patch out-of-process tabchildglobals are just
[System Principal]

and in-process tabchildglobals are
[System Principal|, chrome://browser/content/browser.xul
which less-nicely mixes them with other system compartments.
I mean, the top level chrome doc has chrome://browser/content/browser.xul as document uri, and the
same is used for tabchildglobals, so they all are reported to be similar things.
Comment 8 Nicholas Nethercote [:njn] 2013-02-19 19:32:48 PST
> [System Principal], inProcessTabChildGlobal?ownedBy=chrome://browser/content/browser.xul [3]

It's a bit ugly but I can't think of anything obviously better.  Go for it.
Comment 10 Ryan VanderMeulen [:RyanVM] 2013-02-21 06:59:17 PST
Comment 11 Nicholas Nethercote [:njn] 2013-02-24 15:54:09 PST
This change just led to bug 842710 being filed -- another case of "if we measure it, we find problems with it".  Nice work.
Comment 12 Olli Pettay [:smaug] 2013-02-24 16:43:57 PST
You mean bug 844661

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