Bug 1876648 Comment 1 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Seems reasonable.

For completeness, here's the spot where we destroy the PresShell right now (inside the nsDocumentViewer::Destroy call on line 566 at the bottom of comment 0's link):
https://searchfox.org/mozilla-central/rev/1e726a0e49225dc174ab55d1d0b21e86208d7251/layout/base/nsDocumentViewer.cpp#1687-1689

And right after that, we call mDocument->Destroy() again (after doing it at the start of the destructor too), which is a little wasteful since it's a virtual function call.  Maybe better to tighten things up to ensure that we only call each Destroy() function once as part of our destructor teardown process.
Seems reasonable.

For completeness, here's the spot where we destroy the PresShell right now (inside the nsDocumentViewer::Destroy call on line 566 at the bottom of comment 0's link):
https://searchfox.org/mozilla-central/rev/1e726a0e49225dc174ab55d1d0b21e86208d7251/layout/base/nsDocumentViewer.cpp#1687-1689

And right after that, we call mDocument->Destroy() again (after doing it on line 548 at the start of the destructor too), which is a little wasteful since it's a virtual function call.  Maybe better to tighten things up to ensure that we only call each Destroy() function once as part of our destructor teardown process.

Back to Bug 1876648 Comment 1