mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1192467 - Formalize precondition that SetDisplayDocument must not be called with null. - r=peterv
This commit is contained in:
parent
b42864cc61
commit
0831967c9b
@ -1736,14 +1736,15 @@ public:
|
||||
*/
|
||||
void SetDisplayDocument(nsIDocument* aDisplayDocument)
|
||||
{
|
||||
NS_PRECONDITION(!GetShell() &&
|
||||
!GetContainer() &&
|
||||
!GetWindow(),
|
||||
"Shouldn't set mDisplayDocument on documents that already "
|
||||
"have a presentation or a docshell or a window");
|
||||
NS_PRECONDITION(aDisplayDocument != this, "Should be different document");
|
||||
NS_PRECONDITION(!aDisplayDocument->GetDisplayDocument(),
|
||||
"Display documents should not nest");
|
||||
MOZ_ASSERT(!GetShell() &&
|
||||
!GetContainer() &&
|
||||
!GetWindow(),
|
||||
"Shouldn't set mDisplayDocument on documents that already "
|
||||
"have a presentation or a docshell or a window");
|
||||
MOZ_ASSERT(aDisplayDocument, "Must not be null");
|
||||
MOZ_ASSERT(aDisplayDocument != this, "Should be different document");
|
||||
MOZ_ASSERT(!aDisplayDocument->GetDisplayDocument(),
|
||||
"Display documents should not nest");
|
||||
mDisplayDocument = aDisplayDocument;
|
||||
mHasDisplayDocument = !!aDisplayDocument;
|
||||
}
|
||||
@ -1764,7 +1765,7 @@ public:
|
||||
virtual ~ExternalResourceLoad() {}
|
||||
|
||||
void AddObserver(nsIObserver* aObserver) {
|
||||
NS_PRECONDITION(aObserver, "Must have observer");
|
||||
MOZ_ASSERT(aObserver, "Must have observer");
|
||||
mObservers.AppendElement(aObserver);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user