Open
Bug 1876648
Opened 2 years ago
Updated 2 years ago
Consider to Destroy Preshell before Document in ~DocumentViewer
Categories
(Core :: Layout, enhancement)
Core
Layout
Tracking
()
NEW
People
(Reporter: smaug, Unassigned)
Details
Comment 1•2 years ago
•
|
||
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.
You need to log in
before you can comment on or make changes to this bug.
Description
•