Closed
Bug 1441165
Opened 6 years ago
Closed 6 years ago
Use NotNull for nsINode::OwnerDoc()
Categories
(Core :: DOM: Core & HTML, enhancement)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: emk, Assigned: emk)
References
Details
Attachments
(1 file)
20.60 KB,
patch
|
smaug
:
review-
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•6 years ago
|
||
Attachment #8954001 -
Flags: review?(bugs)
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → VYV03354
Status: NEW → ASSIGNED
Comment 2•6 years ago
|
||
Comment on attachment 8954001 [details] [diff] [review] Use NotNull for nsINode::OwnerDoc() >+++ b/dom/base/NodeInfo.h >@@ -276,17 +277,17 @@ protected: > bool mHashInitialized; > }; > > // nsNodeInfoManager needs to pass mInner to the hash table. > friend class ::nsNodeInfoManager; > > // This is a non-owning reference, but it's safe since it's set to nullptr > // by nsNodeInfoManager::DropDocumentReference when the document is destroyed. >- nsIDocument* MOZ_NON_OWNING_REF mDocument; // Cache of mOwnerManager->mDocument >+ NotNull<nsIDocument*> MOZ_NON_OWNING_REF mDocument; // Cache of mOwnerManager->mDocument this isn't right. The NodeInfo for Document may overlive Document itself, and NodeInfo::mDocument should be set to null in that case. >-// static >-int >-nsNodeInfoManager::DropNodeInfoDocument(PLHashEntry *he, int hashIndex, void *arg) >-{ >- static_cast<mozilla::dom::NodeInfo*>(he->value)->mDocument = nullptr; >- return HT_ENUMERATE_NEXT; >-} >- > void > nsNodeInfoManager::DropDocumentReference() > { > if (mBindingManager) { > mBindingManager->DropDocumentReference(); > } > >- // This is probably not needed anymore. >- PL_HashTableEnumerateEntries(mNodeInfoHash, DropNodeInfoDocument, nullptr); >- So I don't see how this can be removed
Attachment #8954001 -
Flags: review?(bugs) → review-
Assignee | ||
Comment 3•6 years ago
|
||
So this is not possible, unfortunately :(
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•