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

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

Issue 61763017: Replace redundant <track> runtime checks with asserts (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: revert some Created 7 years, 1 month 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: Source/core/html/HTMLMediaElement.cpp
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index ef33ad5a05d2644c3abb38ea7856bdbb08f9d5a1..1c40028bd22265f679a19ed79e003d5204c0a24e 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -2535,8 +2535,7 @@ void HTMLMediaElement::removeAllInbandTracks()
PassRefPtr<TextTrack> HTMLMediaElement::addTextTrack(const String& kind, const String& label, const String& language, ExceptionState& es)
{
- if (!RuntimeEnabledFeatures::videoTrackEnabled())
- return 0;
+ ASSERT(RuntimeEnabledFeatures::videoTrackEnabled());
// 4.8.10.12.4 Text track API
// The addTextTrack(kind, label, language) method of media elements, when invoked, must run the following steps:
@@ -2572,8 +2571,7 @@ PassRefPtr<TextTrack> HTMLMediaElement::addTextTrack(const String& kind, const S
TextTrackList* HTMLMediaElement::textTracks()
{
- if (!RuntimeEnabledFeatures::videoTrackEnabled())
- return 0;
+ ASSERT(RuntimeEnabledFeatures::videoTrackEnabled());
if (!m_textTracks)
m_textTracks = TextTrackList::create(this);
« 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