Open Bug 1425702 Opened 5 years ago Updated 2 months ago

clear mIsTopLevelContentDocument / mIsContentDocument when a document is removed from a docshell

Categories

(Core :: DOM: Core & HTML, enhancement, P2)

enhancement

Tracking

()

People

(Reporter: heycam, Unassigned)

Details

Attachments

(2 files)

Currently once these flags are set, they remain set forever.
Priority: -- → P2
Comment on attachment 8937299 [details]
Bug 1425702 - Part 1: Add some docs for nsIDocument::{mIsTopLevelContentDocument,mIsContentDocument}.

https://reviewboard.mozilla.org/r/208000/#review214400
Attachment #8937299 - Flags: review?(bzbarsky) → review+
Comment on attachment 8937300 [details]
Bug 1425702 - Part 2: Reset nsIDocument::{mIsTopLevelContentDocument,mIsContentDocument} when a document is removed from its docshell.

https://reviewboard.mozilla.org/r/208002/#review214402

This doesn't look right to me.  In particular, ReportUseCounters() uses these members and is called in nsDocument::~nsDocument, which presumably comes after we SetContainer(nullptr).
Attachment #8937300 - Flags: review?(bzbarsky) → review-
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.