Investigate avoiding creating about:blank content viewers that we then throw away

NEW
Unassigned

Status

()

Firefox
General
P3
normal
a month ago
17 days ago

People

(Reporter: Gijs, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(firefox59 affected)

Details

Attachments

(1 attachment)

(Reporter)

Description

a month ago
This came up in bug 1425466, but also seems like it's quite related to bug 1397365 (though I could be wrong!). :kmag, did you have specific culprits in mind in bug 1425466 comment 9 where we can avoid creating about:blank ?
Created attachment 8937192 [details] [diff] [review]
dump about:blank stacks

This is a diagnosis patch I used to figure out what is triggering it. It seems to be the _securityUI getter in browser.xml that creates about:blank documents in the main browser window.
I'm not sure about specific culprits, but I came across this in a lot of places when I was investigating certain WebExtension performance issues. In the profiles, our code creates a docShell, then some other frame script or process script code with an observer causes a document viewer to be instantiated, which triggers a bunch of other observers, before we blow all of it away. WebExtensions code was probably also a culprit in a lot of cases, before we migrated our content script tracking code to C++.

This turns up in fairly obvious ways in content process startup profiles, so it shouldn't be hard to narrow down.
You need to log in before you can comment on or make changes to this bug.