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

Unified Diff: Source/bindings/v8/custom/V8TrackEventCustom.cpp

Issue 170233009: Initial implementation of AudioTrack, AudioTrackList, VideoTrack, and VideoTrackList. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@blink-master
Patch Set: Addressed IDL comments. Created 6 years, 9 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/bindings/v8/custom/V8TrackEventCustom.cpp
diff --git a/Source/bindings/v8/custom/V8TrackEventCustom.cpp b/Source/bindings/v8/custom/V8TrackEventCustom.cpp
index aa76cc2c3fd0bca96b7beaf7099d8f2dc3f55b00..369a5c6a48d9ec8a738c32e7045e36914ce057cc 100644
--- a/Source/bindings/v8/custom/V8TrackEventCustom.cpp
+++ b/Source/bindings/v8/custom/V8TrackEventCustom.cpp
@@ -31,7 +31,9 @@
#include "config.h"
#include "V8TrackEvent.h"
+#include "V8AudioTrack.h"
#include "V8TextTrack.h"
+#include "V8VideoTrack.h"
#include "core/html/track/TrackBase.h"
#include "core/html/track/TrackEvent.h"
@@ -53,10 +55,12 @@ void V8TrackEvent::trackAttributeGetterCustom(const v8::PropertyCallbackInfo<v8:
return;
case TrackBase::AudioTrack:
+ v8SetReturnValueFast(info, static_cast<AudioTrack*>(track), trackEvent);
+ return;
+
case TrackBase::VideoTrack:
- // This should not happen until VideoTrack and AudioTrack are implemented.
- ASSERT_NOT_REACHED();
- break;
+ v8SetReturnValueFast(info, static_cast<VideoTrack*>(track), trackEvent);
+ return;
}
v8SetReturnValueNull(info);

Powered by Google App Engine
This is Rietveld 408576698