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

Unified Diff: Source/bindings/tests/results/core/V8TestInterfaceNode.cpp

Issue 1051753003: bindings: Add toBoolean() to V8Binding.h (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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/tests/results/core/V8TestInterfaceNode.cpp
diff --git a/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp b/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp
index 5415e83f5313e4d85d06e5e3f7d734285c667346..f4ceb04d124e65e19ef9e36dd15fd7e4e6737e6c 100644
--- a/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp
+++ b/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp
@@ -276,6 +276,7 @@ static void perWorldBindingsTestInterfaceEmptyMethodMethodCallbackForMainWorld(c
static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArg", "TestInterfaceNode", info.Holder(), info.GetIsolate());
TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(info.Holder());
bool optionalBooleanArgument;
{
@@ -283,7 +284,9 @@ static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethod(con
v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArg()), impl);
return;
}
- optionalBooleanArgument = info[0]->BooleanValue();
+ optionalBooleanArgument = toBoolean(info.GetIsolate(), info[0], exceptionState);
+ if (exceptionState.throwIfNeeded())
+ return;
}
v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArg(optionalBooleanArgument)), impl);
}
@@ -297,6 +300,7 @@ static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCall
static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
{
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArg", "TestInterfaceNode", info.Holder(), info.GetIsolate());
TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(info.Holder());
bool optionalBooleanArgument;
{
@@ -304,7 +308,9 @@ static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodForM
v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArg()));
return;
}
- optionalBooleanArgument = info[0]->BooleanValue();
+ optionalBooleanArgument = toBoolean(info.GetIsolate(), info[0], exceptionState);
+ if (exceptionState.throwIfNeeded())
+ return;
}
v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArg(optionalBooleanArgument)));
}

Powered by Google App Engine
This is Rietveld 408576698