mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-07 11:56:51 +00:00
Bug 1583203 - Annotate nsINode::OwnerDoc() as MOZ_NONNULL_RETURN. r=smaug
People keep adding useless null-checks and it was not clear what the consensus
was from bug 1441165
, but this should be unobjectionable I guess.
Differential Revision: https://phabricator.services.mozilla.com/D46781
--HG--
extra : moz-landing-system : lando
This commit is contained in:
parent
b8b5911e89
commit
1a26094a08
@ -597,13 +597,15 @@ class nsINode : public mozilla::dom::EventTarget {
|
||||
*
|
||||
* For all other cases OwnerDoc and GetOwnerDocument behave identically.
|
||||
*/
|
||||
Document* OwnerDoc() const { return mNodeInfo->GetDocument(); }
|
||||
Document* OwnerDoc() const MOZ_NONNULL_RETURN {
|
||||
return mNodeInfo->GetDocument();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the "owner document" of this node as an nsINode*. Implemented
|
||||
* in Document.h.
|
||||
*/
|
||||
inline nsINode* OwnerDocAsNode() const;
|
||||
inline nsINode* OwnerDocAsNode() const MOZ_NONNULL_RETURN;
|
||||
|
||||
/**
|
||||
* Returns true if the content has an ancestor that is a document.
|
||||
|
Loading…
Reference in New Issue
Block a user