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

Unified Diff: Source/core/html/track/TextTrack.cpp

Issue 946583002: Add [TypeChecking=Interface] to the TextTrack interface (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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
Index: Source/core/html/track/TextTrack.cpp
diff --git a/Source/core/html/track/TextTrack.cpp b/Source/core/html/track/TextTrack.cpp
index 54f2cbdec176b2a2c6a4aefe59f6fb5adc5abd34..04fda3c362a2baa1dbbf86be57c5deee8e75e374 100644
--- a/Source/core/html/track/TextTrack.cpp
+++ b/Source/core/html/track/TextTrack.cpp
@@ -225,9 +225,7 @@ TextTrackCueList* TextTrack::activeCues() const
void TextTrack::addCue(PassRefPtrWillBeRawPtr<TextTrackCue> prpCue)
{
- if (!prpCue)
- return;
-
+ ASSERT(prpCue);
RefPtrWillBeRawPtr<TextTrackCue> cue = prpCue;
// TODO(93143): Add spec-compliant behavior for negative time values.
@@ -254,8 +252,7 @@ void TextTrack::addCue(PassRefPtrWillBeRawPtr<TextTrackCue> prpCue)
void TextTrack::removeCue(TextTrackCue* cue, ExceptionState& exceptionState)
{
- if (!cue)
- return;
+ ASSERT(cue);
// 4.8.10.12.5 Text track API
« no previous file with comments | « LayoutTests/media/track/opera/interfaces/TextTrack/removeCue.html ('k') | Source/core/html/track/TextTrack.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698