Ok, I'm blindly guessing here, but could this be the reason: The thing that owns the nsFrameLoader is (naturally) nsFrameLoaderOwner. If we look to who inherits from nsFrameLoaderOwner we find three classes, nsObjectLoadingContent, nsGenericHTMLFrameElement, and XULFrameElement[1]. Of these three nsGenericHTMLFrameElement and XULFrameElement calls nsFrameLoader::Destroy while unlinking[2, 3]. nsObjectLoadingContent is inherited by HTMLObjectElement[4] and HTMLEmbedElement[5] and neither destroys the nsFrameLoader in the nsObjectLoadingContent base. HTMLObjectElement does unlinking, HTMLEmbedElement does not. Extending HTMLObjectElement and HTMLEmbedElement to also destroy nsFrameLoader when unlinking could potentially be what's missing. Looking at nsGenericHTMLFrameElement it turns out :baku added exactly that, so adding him for a ni if this seems like a good plan. I'll implement this and kick off a try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=8ea60db76294f95170c2bde1c71c36eabbfc86b3 [1] https://searchfox.org/mozilla-central/search?q=public+nsFrameLoaderOwner&path= [2] https://searchfox.org/mozilla-central/source/dom/html/nsGenericHTMLFrameElement.cpp#42-44 [3] https://searchfox.org/mozilla-central/source/dom/xul/XULFrameElement.cpp#27-29 [4] https://searchfox.org/mozilla-central/source/dom/html/HTMLObjectElement.h [5] https://searchfox.org/mozilla-central/source/dom/html/HTMLEmbedElement.h
Bug 1548992 Comment 3 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Ok, I'm blindly guessing here, but could this be the reason: The thing that owns the nsFrameLoader is (naturally) nsFrameLoaderOwner. If we look to who inherits from nsFrameLoaderOwner we find three classes, nsObjectLoadingContent, nsGenericHTMLFrameElement, and XULFrameElement[1]. Of these three nsGenericHTMLFrameElement and XULFrameElement calls nsFrameLoader::Destroy while unlinking[2, 3]. nsObjectLoadingContent is inherited by HTMLObjectElement[4] and HTMLEmbedElement[5] and neither destroys the nsFrameLoader in the nsObjectLoadingContent base. HTMLObjectElement does unlinking, HTMLEmbedElement does not. Extending HTMLObjectElement and HTMLEmbedElement to also destroy nsFrameLoader when unlinking could potentially be what's missing. Looking at nsGenericHTMLFrameElement it turns out :baku added exactly that, so adding him for a ni if this seems like a good plan. I'll implement this and kick off a try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e6e14371570ca34edfba5c444dcbe00f92f5edde [1] https://searchfox.org/mozilla-central/search?q=public+nsFrameLoaderOwner&path= [2] https://searchfox.org/mozilla-central/source/dom/html/nsGenericHTMLFrameElement.cpp#42-44 [3] https://searchfox.org/mozilla-central/source/dom/xul/XULFrameElement.cpp#27-29 [4] https://searchfox.org/mozilla-central/source/dom/html/HTMLObjectElement.h [5] https://searchfox.org/mozilla-central/source/dom/html/HTMLEmbedElement.h