Bug 1369548 - HTMLMediaElement::SetMediaKeys should continue working even the decoder is shutting down. r=cpearce
The MediaKeys status inside a HTMLME cannot be reflected correctly if the mSetCDMRequest is disconnected in HTMLME::ShutdownDecoder. This may happen when a page calls load() or sets new src right after setting MediaKeys to null. MozReview-Commit-ID: 3BZOmw7BNFO
This commit is contained in:
@@ -1723,7 +1723,7 @@ void HTMLMediaElement::ShutdownDecoder()
|
||||
{
|
||||
RemoveMediaElementFromURITable();
|
||||
NS_ASSERTION(mDecoder, "Must have decoder to shut down");
|
||||
mSetCDMRequest.DisconnectIfExists();
|
||||
|
||||
mWaitingForKeyListener.DisconnectIfExists();
|
||||
if (mMediaSource) {
|
||||
mMediaSource->CompletePendingTransactions();
|
||||
@@ -4064,6 +4064,8 @@ HTMLMediaElement::~HTMLMediaElement()
|
||||
mVideoFrameContainer->ForgetElement();
|
||||
}
|
||||
UnregisterActivityObserver();
|
||||
|
||||
mSetCDMRequest.DisconnectIfExists();
|
||||
if (mDecoder) {
|
||||
ShutdownDecoder();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user