Skip to content

Memory leak when opening and closing chrome windows #286

@Fanolian

Description

@Fanolian

Firefox environment: 32bit Firefox 48 (e10s disabled) or current Nightly (e10s enabled/disabled)

Steps to reproduce:

  1. Install Stylish 2.0.7 in a new profile. Restart browser.
  2. Without creating/installing any styles, open one tab and only in one window. Go to about:memory.
  3. Minimize memory usage a few times then measure a verbose report.
  4. Search for "detached" (without quote) in about:memory. It should have no detached windows at this point.
  5. Open a new window or a new private window, then close it.
  6. Go back to about:memory, minimize memory usage and measure again. a top(none)/detached/window(chrome://browser/content/browser.xul)/dom/event-listeners is created.
  7. Repeat step 5 and 6 a few times. More top(none)/detached/… are created and cannot be destroyed unless restarting browser.

It is not a recent regression. I think I've seen it for a very long time.

Note:
Other chrome windows may leak too, e.g. Library window(chrome://browser/content/places/places.xul)

P.S.
Traditional extensions (non-jetpack/WebExtensions) like Greasemonkey and Tree Style Tabs [1] had similar issues for a long time too but fixed eventually. They may provide hints on why Stylish leaks.

[1]: For Tree Style Tabs, search for commits around 2015-11-06 to 2015-11-10 for relevant fixes:
piroor/treestyletab@9516999...000ce6b

Thank you for your extension.

Update: add commit range for Tree Style Tabs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions