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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/V8LongExperimentalCallbackFunction.cpp

Issue 2350813005: bindings: Support sequence in callback function arguments (Closed)
Patch Set: Created 4 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
Index: third_party/WebKit/Source/bindings/tests/results/core/V8LongExperimentalCallbackFunction.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8LongExperimentalCallbackFunction.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8LongExperimentalCallbackFunction.cpp
index da8a688d788174fa253d2a33dfc5035fb2dd8356..9a12e94655af74e5880f2890a1364629368122d0 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8LongExperimentalCallbackFunction.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8LongExperimentalCallbackFunction.cpp
@@ -6,7 +6,9 @@
#include "V8LongExperimentalCallbackFunction.h"
+#include "bindings/core/v8/ExceptionState.h"
#include "bindings/core/v8/ScriptState.h"
+#include "bindings/core/v8/ToV8.h"
#include "bindings/core/v8/V8Binding.h"
#include "wtf/Assertions.h"
@@ -30,7 +32,9 @@ bool V8LongExperimentalCallbackFunction::call(ScriptState* scriptState, ScriptWr
if (m_callback.isEmpty())
return false;
+
ScriptState::Scope scope(scriptState);
+ ExceptionState exceptionState(scriptState->isolate(), ExceptionState::ExecutionContext, "LongExperimentalCallbackFunction");
v8::Local<v8::Value> num1Argument = v8::Integer::New(scriptState->isolate(), num1);
v8::Local<v8::Value> num2Argument = v8::Integer::New(scriptState->isolate(), num2);
@@ -42,7 +46,7 @@ bool V8LongExperimentalCallbackFunction::call(ScriptState* scriptState, ScriptWr
if (V8ScriptRunner::callFunction(m_callback.newLocal(scriptState->isolate()), scriptState->getExecutionContext(), scriptState->context()->Global(), 2, argv, scriptState->isolate()).ToLocal(&v8ReturnValue))
{
- int cppValue = toInt32(info.GetIsolate(), v8ReturnValue, NormalConversion, exceptionState);
bashi 2016/09/21 02:00:21 oh, this was wrong...
+ int cppValue = toInt32(scriptState->isolate(), v8ReturnValue, NormalConversion, exceptionState);
if (exceptionState.hadException())
return false;
returnValue = cppValue;

Powered by Google App Engine
This is Rietveld 408576698