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

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

Issue 1856373004: Fix potential null pointer access in HTMLMediaElement::seek (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix potential null pointer in HTMLMediaElement::seek Created 4 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
index 9ae9d1d0dab809b057dec678a4eef22686c8db50..f2ff751f0c19c6d0c3bda93c4e723ed6074036b7 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -1690,7 +1690,10 @@ void HTMLMediaElement::seek(double time)
WTF_LOG(Media, "HTMLMediaElement::seek(%p, %f)", this, time);
// 2 - If the media element's readyState is HAVE_NOTHING, abort these steps.
- if (m_readyState == HAVE_NOTHING)
+ // FIXME: remove m_webMediaPlayer check once we figure out how
+ // m_webMediaPlayer is going out of sync with readystate.
+ // m_webMediaPlayer is cleared but readystate is not set to HAVE_NOTHING.
+ if (!m_webMediaPlayer || m_readyState == HAVE_NOTHING)
return;
// Ignore preload none and start load if necessary.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698