Note: There are a few cases of duplicates in user autocompletion which are being worked on.

XSL transform causes zombie compartment

Assigned to



5 years ago
5 years ago


(Reporter: njn, Assigned: johns)


({mlk, testcase})

16 Branch
mlk, testcase

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [MemShrink:P2])


(1 attachment)



5 years ago
Created attachment 661652 [details]
test case

[This bug report came via my blog:  I can reproduce it.]

The issue I have seen is with compartments being leaked by xsl transformed documents. A reduced example of this with all add-ons disabled …

1) Initially about:compartments?verbose reports no user compartments

2) When the main.xml file is loaded in a tab, about:compartments reports the user compartments…

file:///C:/DirPath/HTML2/main.xml, file:///C:/DirPath/HTML2/object1.html [4]

I.e. the main.xml document and 4 compartments for 2 html objects displayed by the transformed doc … possibly outer and inner compartments? for each of the 2 objects … the transformed doc has a body containing 2 divs and each div contains 1 object, the same simple html doc is used for both objects

3) After deleting the main.xml tab, about:compartments reports the user compartments…

file:///C:/DirPath/HTML2/main.xml, file:///C:/DirPath/HTML2/object1.html [2]

I.e. 2 compartments for the loaded objects have not been cleaned up. The main.xml compartment and 2 of the object compartments have been cleaned.

Additional info from about:memory

¦ +—–115,536 B (00.31%) — compartment(file:///C:/DirPath/HTML2/main.xml, file:///C:/DirPath/HTML2/object1.html)
¦ ¦ +—98,304 B (00.26%) — gc-heap
¦ ¦ ¦ +–71,856 B (00.19%) — arena/unused [2]
¦ ¦ ¦ +–26,448 B (00.07%) — sundries [2]
¦ ¦ +—17,232 B (00.05%) — other-sundries [2]

and under window-objects

¦ +——3,544 B (00.01%) — top(file:///C:/DirPath/HTML2/object1.html, id=23)/active/window(file:///C:/DirPath/HTML2/object1.html)/dom [2]
¦ +——3,544 B (00.01%) — top(file:///C:/DirPath/HTML2/object1.html, id=21)/active/window(file:///C:/DirPath/HTML2/object1.html)/dom [2]
¦ +——–896 B (00.00%) — top(none)/detached/window(file:///C:/DirPath/HTML2/main.xml)/dom [2]

There are no ghost windows reported.

Each time the main.xml document is loaded and the tab deleted, further compartments are generated and leaked.

The leak only occurs when the xsl transform is used. E.g if a main.html doc is used instead of the main.xml, no leaked compartments are observed.
Peter, do you still actively own XSLT?
I see an actual shutdown leak here.
Keywords: mlk, testcase


5 years ago
Assignee: nobody → jschoenick
Whiteboard: [MemShrink] → [MemShrink:P2]
You need to log in before you can comment on or make changes to this bug.