Closed Bug 771426 Opened 11 years ago Closed 11 years ago
Further distinguish top windows in memory reports
The DOM memory reporters currently group things under top windows, e.g.: top(https://tbpl.mozilla.org/?tree=Mozilla-Inbound, id=174) I'd like to distinguish between the different kinds of windows, e.g. tabs vs. browser windows. The attached patch distinguishes between normal, chrome, and modal windows. With it applied, here are some examples: # always present chrome-top(resource://gre-resources/hiddenWindow.html, id=3) # controlled by the user chrome-top(chrome://browser/content/browser.xul, id=1) chrome-top(chrome://global/content/console.xul, id=18) chrome-top(chrome://global/content/viewSource.xul, id=50) chrome-top(chrome://browser/content/scratchpad.xul, id=72) # tabs normal-top(http://techcrunch.com/, id=12) normal-top(about:memory?verbose, id=6) normal-top(about:addons, id=41) # contents of the "view source" window normal-top(view-source:about:memory?verbose, id=52) In summary: - "chrome-top" corresponds to physical windows in the UI, with the hidden window as a special case. - "normal-top" corresponds to "tabs", with the content of the view source window as a special case. - I didn't manage to trigger any "modal-top" windows -- any suggestions how to do that? Are there other cases I'm missing? Is there a better way to distinguish these cases -- e.g. is there a fool-proof way to identify an nsGlobalWindow that is a browser tab?
Attachment #639587 - Flags: feedback?(jst)
> - I didn't manage to trigger any "modal-top" windows -- any suggestions how to do that? Did you try alert()?
Comment on attachment 639587 [details] [diff] [review] patch window.showModalDialog() is what creates modal content windows, so call that from a onclick handler or what not and you should see one of those. But you'll of course have a modal dialog to deal with. Modal content windows are *very* rare, so it may not even be worth distinguishing between modal content windows and tabs here.
Attachment #639587 - Flags: feedback?(jst) → feedback+
Thanks, jst. When asking for feedback I was hoping you'd say "here's a better way to distinguish windows" but I get the feeling there isn't one.
Whiteboard: [MemShrink] → [MemShrink:P2]
This doesn't add much.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.