In bug 759581 comment 4, jlebar started seeing duplicated compartments like this in about:compartments: https://bugzilla.mozilla.org/ https://bugzilla.mozilla.org/, about:blank I've just started seeing them myself today; I'm fairly sure this is a recent regression. For each compartment, in about:compartments we show the compartment's principals name, and then we show its location (if it has one). I.e. only one of these compartments has its location set, and the location is "about:blank", which is surprising. This doesn't have anything to do with session restore; it has something to do with logging into sites. If I am logged into Bugzilla and I open any Bugzilla page, I get duplicate compartments of this kind. If I log out of Bugzilla, the "about:blank" ones disappear. I've been seeing duplicates when logged into Gmail as well.
Ah, yes, this is what I was seeing. Some kind of zombie compartment caused by the login doorhanger maybe?
I don't know if this would help, but I should be able to get the complete contents of these compartments using JS_DumpHeapComplete, if we can figure out which compartments (by address) are of interest.
Ok, it's not a regression. I just tested with a version prior to bug 754771 and got this: https://bugzilla.mozilla.org/  When I log out the "" goes away. So I suspect this behaviour has been present for a while but the "" wasn't enough to get people's attention. In fact, it took two things to get people to notice: (a) bug 752357's listing of locations for non-system compartments and (b) then bug 754771's addition of the "about:blank" location for these duplicate compartments. (Also, I bet it wasn't two compartments prior to CPG.) So, questions: - What is it about logging in that causes this? - Is the second compartment necessary? - If it is necessary, can be come up with a better location than "about:blank", which is quite confusing?
jlebar pointed something out on IRC: you don't have to go through the log-in process in Bugzilla to see the second compartment, you just have to be logged in. I.e. if you are logged in and then restart Firefox, you still see the second compartment.
Range about https://bugzilla.mozilla.org/  In m-c Cannot reproduce: http://hg.mozilla.org/mozilla-central/rev/2db9df42823d Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/15.0 Firefox/15.0a1 ID:20120504030509 Can reproduce: http://hg.mozilla.org/mozilla-central/rev/e1a40027dc7e Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/15.0 Firefox/15.0a1 ID:20120504014349 Pushlog: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=2db9df42823d&tochange=e1a40027dc7e In m-inbound Cannot reproduce: http://hg.mozilla.org/integration/mozilla-inbound/rev/ac00c792933e Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/15.0 Firefox/15.0a1 ID:20120503001006 Can reproduce: http://hg.mozilla.org/integration/mozilla-inbound/rev/bed8c4e3dfdf Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/15.0 Firefox/15.0a1 ID:20120503001301 Pushlog: http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=ac00c792933e&tochange=bed8c4e3dfdf I cannot: 2654f79e0e84 I can reproduce: bed8c4e3dfdf So, triggered by bed8c4e3dfdf Luke Wagner — Bug 650353 - Implement Compartment-Per-Global in XPConnect. r=mrbkap
Thanks for the confirmation that CPG was the root cause, Alice!
After talking to bz, I've concluded this is behaving exactly as it should. Both Gmail and Bugzilla (when logged in) contain an iframe that doesn't specify a URI. When you log out of Bugzilla, that iframe is no longer present, something to do with it not loading YUI in that case.