mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1113474 - Release MediaKeys when cleaning up pending promises - r=jwwang
This commit is contained in:
parent
1cc7f0e61c
commit
ba23326c70
@ -82,6 +82,7 @@ CloseSessions(const nsAString& aKey,
|
||||
void* aClosure)
|
||||
{
|
||||
aSession->OnClosed();
|
||||
((MediaKeys*)aClosure)->Release();
|
||||
return PL_DHASH_NEXT;
|
||||
}
|
||||
|
||||
@ -111,7 +112,9 @@ MediaKeys::Shutdown()
|
||||
mProxy = nullptr;
|
||||
}
|
||||
|
||||
mPromises.Enumerate(&RejectPromises, nullptr);
|
||||
nsRefPtr<MediaKeys> kungFuDeathGrip = this;
|
||||
|
||||
mPromises.Enumerate(&RejectPromises, this);
|
||||
mPromises.Clear();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user