mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1167418 - Check AppendElement call in MediaQueryList. r=heycam
This preemptively silences an unused result warning.
This commit is contained in:
parent
e8f9af4d5d
commit
05bb4139e0
@ -103,10 +103,11 @@ MediaQueryList::AddListener(MediaQueryListListener& aListener)
|
||||
}
|
||||
}
|
||||
|
||||
mCallbacks.AppendElement(&aListener, fallible);
|
||||
if (!HasListeners()) {
|
||||
// Append failed; undo the AddRef above.
|
||||
NS_RELEASE_THIS();
|
||||
if (!mCallbacks.AppendElement(&aListener, fallible)) {
|
||||
if (!HasListeners()) {
|
||||
// Append failed; undo the AddRef above.
|
||||
NS_RELEASE_THIS();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user