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

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

Issue 177613005: Remove the TextTrackCue constructor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix fast/js/constructor-length.html Created 6 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
« no previous file with comments | « LayoutTests/media/track/text-track-cue-constructor-expected.txt ('k') | Source/core/frame/UseCounter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/custom/V8TextTrackCueCustom.cpp
diff --git a/Source/bindings/v8/custom/V8TextTrackCueCustom.cpp b/Source/bindings/v8/custom/V8TextTrackCueCustom.cpp
index 4f33bc9f9a1ef875e4cb96c6859a06a2bb72e89a..20d7dd0a066d7a8a38086e7bc77cb3846ddcd3b5 100644
--- a/Source/bindings/v8/custom/V8TextTrackCueCustom.cpp
+++ b/Source/bindings/v8/custom/V8TextTrackCueCustom.cpp
@@ -32,10 +32,6 @@
#include "V8VTTCue.h"
-#include "bindings/v8/ExceptionMessages.h"
-#include "bindings/v8/ExceptionState.h"
-#include "core/frame/UseCounter.h"
-
namespace WebCore {
v8::Handle<v8::Value> toV8(TextTrackCue* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
@@ -43,27 +39,4 @@ v8::Handle<v8::Value> toV8(TextTrackCue* impl, v8::Handle<v8::Object> creationCo
return toV8(toVTTCue(impl), creationContext, isolate);
}
-// Custom constructor to make new TextTrackCue(...) return a VTTCue. This is legacy
-// compat, not per spec, and should be removed at the earliest opportunity.
-void V8TextTrackCue::constructorCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(ExceptionState::ConstructionContext, "TextTrackCue", info.Holder(), info.GetIsolate());
- if (UNLIKELY(info.Length() < 3)) {
- exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, info.Length()));
- exceptionState.throwIfNeeded();
- return;
- }
- V8TRYCATCH_VOID(double, startTime, static_cast<double>(info[0]->NumberValue()));
- V8TRYCATCH_VOID(double, endTime, static_cast<double>(info[1]->NumberValue()));
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, text, info[2]);
-
- Document& document = *toDocument(currentExecutionContext(info.GetIsolate()));
- UseCounter::countDeprecation(document, UseCounter::TextTrackCueConstructor);
-
- RefPtr<VTTCue> impl = VTTCue::create(document, startTime, endTime, text);
- v8::Handle<v8::Object> wrapper = wrap(impl.get(), info.Holder(), info.GetIsolate());
-
- v8SetReturnValue(info, wrapper);
-}
-
} // namespace WebCore
« no previous file with comments | « LayoutTests/media/track/text-track-cue-constructor-expected.txt ('k') | Source/core/frame/UseCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698