Bug 1414680 - Make MediaDecoderOwner::DispatchAsyncEvent() return void. r=jwwang

The return value is unchecked in MediaDecoder, and we only ever returned
NS_OK anyway. And we if the dispatch fails, we can't really do anything;
dispatching an "error" event probably won't work.

MozReview-Commit-ID: 67K6Mjft6tY
This commit is contained in:
Chris Pearce
2017-11-05 09:12:44 +01:00
parent 2e999b6b83
commit f8a6ecb100
4 changed files with 6 additions and 10 deletions

View File

@@ -6305,7 +6305,8 @@ nsresult HTMLMediaElement::DispatchEvent(const nsAString& aName)
false);
}
nsresult HTMLMediaElement::DispatchAsyncEvent(const nsAString& aName)
void
HTMLMediaElement::DispatchAsyncEvent(const nsAString& aName)
{
LOG_EVENT(LogLevel::Debug, ("%p Queuing event %s", this,
NS_ConvertUTF16toUTF8(aName).get()));
@@ -6314,7 +6315,7 @@ nsresult HTMLMediaElement::DispatchAsyncEvent(const nsAString& aName)
// if the page comes out of the bfcache.
if (mEventDeliveryPaused) {
mPendingEvents.AppendElement(aName);
return NS_OK;
return;
}
nsCOMPtr<nsIRunnable> event;
@@ -6339,8 +6340,6 @@ nsresult HTMLMediaElement::DispatchAsyncEvent(const nsAString& aName)
mPlayTime.Pause();
HiddenVideoStop();
}
return NS_OK;
}
nsresult HTMLMediaElement::DispatchPendingMediaEvents()