Created attachment 639587 [details] [diff] [review]
The DOM memory reporters currently group things under top windows, e.g.:
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
# controlled by the user
# contents of the "view source" window
- "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?
> - 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]
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.
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.
This doesn't add much.