Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1204)

Unified Diff: Source/core/html/HTMLMediaElement.cpp

Issue 330593005: HTMLMediaElement::webMediaPlayer() should never be null if m_readyState >= HAVE_METADATA (media eng… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed review comments Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/http/tests/media/video-load-metadata-decode-error-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLMediaElement.cpp
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index 385f7ee088b0d2f72e17a66f06fe6ff430d477e0..69e802f33b73138ef138fecc19eb376db56c274f 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -1460,6 +1460,7 @@ void HTMLMediaElement::noneSupported()
void HTMLMediaElement::mediaEngineError(PassRefPtrWillBeRawPtr<MediaError> err)
{
+ ASSERT(m_readyState >= HAVE_METADATA);
WTF_LOG(Media, "HTMLMediaElement::mediaEngineError(%d)", static_cast<int>(err->code()));
// 1 - The user agent should cancel the fetching process.
@@ -1475,9 +1476,9 @@ void HTMLMediaElement::mediaEngineError(PassRefPtrWillBeRawPtr<MediaError> err)
closeMediaSource();
- // 4 - Set the element's networkState attribute to the NETWORK_EMPTY value and queue a
+ // 4 - Set the element's networkState attribute to the NETWORK_IDLE value and queue a
// task to fire a simple event called emptied at the element.
- m_networkState = NETWORK_EMPTY;
+ m_networkState = NETWORK_IDLE;
scheduleEvent(EventTypeNames::emptied);
philipj_slow 2014/06/18 13:52:14 If we are to match what the spec will probably com
Srirama 2014/06/18 14:15:08 Done.
// 5 - Set the element's delaying-the-load-event flag to false. This stops delaying the load event.
« no previous file with comments | « LayoutTests/http/tests/media/video-load-metadata-decode-error-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698