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

Unified Diff: Source/bindings/core/v8/custom/V8ElementCustom.cpp

Issue 555133003: Use ExceptionState to throw exceptions when converting arrays (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 6 years, 3 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 | « Source/bindings/core/v8/V8StringResource.h ('k') | Source/bindings/core/v8/custom/V8MessageEventCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/custom/V8ElementCustom.cpp
diff --git a/Source/bindings/core/v8/custom/V8ElementCustom.cpp b/Source/bindings/core/v8/custom/V8ElementCustom.cpp
index 2880a0f97471fd22564410cf8b31139cba9e8cd9..51ea1171d90be676daab6fbea6dddc88c71d2fed 100644
--- a/Source/bindings/core/v8/custom/V8ElementCustom.cpp
+++ b/Source/bindings/core/v8/custom/V8ElementCustom.cpp
@@ -95,7 +95,7 @@ void animate2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "animate", "Element", info.Holder(), info.GetIsolate());
Element* impl = V8Element::toImpl(info.Holder());
- TONATIVE_VOID(Vector<Dictionary>, keyframes, toImplArray<Dictionary>(info[0], 1, info.GetIsolate()));
+ TONATIVE_VOID_EXCEPTIONSTATE(Vector<Dictionary>, keyframes, toImplArray<Dictionary>(info[0], 1, info.GetIsolate(), exceptionState), exceptionState);
RefPtrWillBeRawPtr<AnimationPlayer> result = ElementAnimation::animate(*impl, keyframes, exceptionState);
if (exceptionState.throwIfNeeded())
return;
@@ -129,7 +129,7 @@ void animate5Method(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "animate", "Element", info.Holder(), info.GetIsolate());
Element* impl = V8Element::toImpl(info.Holder());
- TONATIVE_VOID(Vector<Dictionary>, keyframes, toImplArray<Dictionary>(info[0], 1, info.GetIsolate()));
+ TONATIVE_VOID_EXCEPTIONSTATE(Vector<Dictionary>, keyframes, toImplArray<Dictionary>(info[0], 1, info.GetIsolate(), exceptionState), exceptionState);
TONATIVE_VOID(double, duration, static_cast<double>(info[1]->NumberValue()));
RefPtrWillBeRawPtr<AnimationPlayer> result = ElementAnimation::animate(*impl, keyframes, duration, exceptionState);
if (exceptionState.throwIfNeeded())
@@ -142,7 +142,7 @@ void animate6Method(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "animate", "Element", info.Holder(), info.GetIsolate());
Element* impl = V8Element::toImpl(info.Holder());
- TONATIVE_VOID(Vector<Dictionary>, keyframes, toImplArray<Dictionary>(info[0], 1, info.GetIsolate()));
+ TONATIVE_VOID_EXCEPTIONSTATE(Vector<Dictionary>, keyframes, toImplArray<Dictionary>(info[0], 1, info.GetIsolate(), exceptionState), exceptionState);
TONATIVE_VOID(Dictionary, timingInput, Dictionary(info[1], info.GetIsolate()));
if (!timingInput.isUndefinedOrNull() && !timingInput.isObject()) {
exceptionState.throwTypeError("parameter 2 ('timingInput') is not an object.");
« no previous file with comments | « Source/bindings/core/v8/V8StringResource.h ('k') | Source/bindings/core/v8/custom/V8MessageEventCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698