| Index: third_party/WebKit/Source/bindings/tests/results/core/V8StringSequenceCallbackFunctionSequenceLongArg.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8LongExperimentalCallbackFunction.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8StringSequenceCallbackFunctionSequenceLongArg.cpp
|
| similarity index 52%
|
| copy from third_party/WebKit/Source/bindings/tests/results/core/V8LongExperimentalCallbackFunction.cpp
|
| copy to third_party/WebKit/Source/bindings/tests/results/core/V8StringSequenceCallbackFunctionSequenceLongArg.cpp
|
| index da8a688d788174fa253d2a33dfc5035fb2dd8356..5d1126ab7caae4d29cbc3c49510ec1b11ae32ae8 100644
|
| --- a/third_party/WebKit/Source/bindings/tests/results/core/V8LongExperimentalCallbackFunction.cpp
|
| +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8StringSequenceCallbackFunctionSequenceLongArg.cpp
|
| @@ -4,50 +4,51 @@
|
|
|
| // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
|
|
|
| -#include "V8LongExperimentalCallbackFunction.h"
|
| +#include "V8StringSequenceCallbackFunctionSequenceLongArg.h"
|
|
|
| #include "bindings/core/v8/ScriptState.h"
|
| +#include "bindings/core/v8/ToV8.h"
|
| #include "bindings/core/v8/V8Binding.h"
|
| #include "wtf/Assertions.h"
|
|
|
| namespace blink {
|
|
|
| -V8LongExperimentalCallbackFunction::V8LongExperimentalCallbackFunction(v8::Isolate* isolate, v8::Local<v8::Function> callback)
|
| +V8StringSequenceCallbackFunctionSequenceLongArg::V8StringSequenceCallbackFunctionSequenceLongArg(v8::Isolate* isolate, v8::Local<v8::Function> callback)
|
| : m_callback(isolate, callback)
|
| {
|
| DCHECK(!m_callback.isEmpty());
|
| m_callback.setPhantom();
|
| }
|
|
|
| -DEFINE_TRACE(V8LongExperimentalCallbackFunction)
|
| +DEFINE_TRACE(V8StringSequenceCallbackFunctionSequenceLongArg)
|
| {
|
| }
|
|
|
| -bool V8LongExperimentalCallbackFunction::call(ScriptState* scriptState, ScriptWrappable* scriptWrappable, int num1, int num2, int& returnValue)
|
| +bool V8StringSequenceCallbackFunctionSequenceLongArg::call(ScriptState* scriptState, ScriptWrappable* scriptWrappable, ExceptionState& exceptionState, const Vector<int>& arg, Vector<String>& returnValue)
|
| {
|
| if (!scriptState->contextIsValid())
|
| return false;
|
|
|
| if (m_callback.isEmpty())
|
| return false;
|
| +
|
| ScriptState::Scope scope(scriptState);
|
|
|
| - v8::Local<v8::Value> num1Argument = v8::Integer::New(scriptState->isolate(), num1);
|
| - v8::Local<v8::Value> num2Argument = v8::Integer::New(scriptState->isolate(), num2);
|
| - v8::Local<v8::Value> argv[] = { num1Argument, num2Argument };
|
| + v8::Local<v8::Value> argArgument = toV8(arg, scriptState->context()->Global(), scriptState->isolate());
|
| + v8::Local<v8::Value> argv[] = { argArgument };
|
|
|
| v8::Local<v8::Value> v8ReturnValue;
|
| v8::TryCatch exceptionCatcher(scriptState->isolate());
|
| - exceptionCatcher.SetVerbose(true);
|
| -
|
| - if (V8ScriptRunner::callFunction(m_callback.newLocal(scriptState->isolate()), scriptState->getExecutionContext(), scriptState->context()->Global(), 2, argv, scriptState->isolate()).ToLocal(&v8ReturnValue))
|
| + if (V8ScriptRunner::callFunction(m_callback.newLocal(scriptState->isolate()), scriptState->getExecutionContext(), scriptState->context()->Global(), 1, argv, scriptState->isolate()).ToLocal(&v8ReturnValue))
|
| {
|
| - int cppValue = toInt32(info.GetIsolate(), v8ReturnValue, NormalConversion, exceptionState);
|
| + Vector<String> cppValue = toImplArray<Vector<String>>(v8ReturnValue, 0, scriptState->isolate(), exceptionState);
|
| if (exceptionState.hadException())
|
| return false;
|
| returnValue = cppValue;
|
| return true;
|
| }
|
| + DCHECK(exceptionCatcher.HasCaught());
|
| + exceptionState.rethrowV8Exception(exceptionCatcher.Exception());
|
| return false;
|
| }
|
|
|
|
|