| Index: third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionTypedef.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionTypedef.cpp b/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionTypedef.cpp
|
| index 11ad490a74bc10c1d53e07774f054615b9438648..3979079235edc9df22226484b86a923d086f4248 100644
|
| --- a/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionTypedef.cpp
|
| +++ b/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionTypedef.cpp
|
| @@ -17,8 +17,9 @@
|
|
|
| namespace blink {
|
|
|
| -VoidCallbackFunctionTypedef::VoidCallbackFunctionTypedef(v8::Isolate* isolate, v8::Local<v8::Function> callback)
|
| - : m_callback(isolate, callback)
|
| +VoidCallbackFunctionTypedef::VoidCallbackFunctionTypedef(ScriptState* scriptState, v8::Local<v8::Function> callback)
|
| + : m_scriptState(scriptState),
|
| + m_callback(scriptState->isolate(), callback)
|
| {
|
| DCHECK(!m_callback.isEmpty());
|
| m_callback.setPhantom();
|
| @@ -33,12 +34,12 @@ DEFINE_TRACE_WRAPPERS(VoidCallbackFunctionTypedef)
|
| visitor->traceWrappers(&m_callback.cast<v8::Object>());
|
| }
|
|
|
| -bool VoidCallbackFunctionTypedef::call(ScriptState* scriptState, ScriptWrappable* scriptWrappable, const String& arg)
|
| +bool VoidCallbackFunctionTypedef::call(ScriptWrappable* scriptWrappable, const String& arg)
|
| {
|
| - if (!scriptState->contextIsValid())
|
| + if (!m_scriptState->contextIsValid())
|
| return false;
|
|
|
| - ExecutionContext* context = scriptState->getExecutionContext();
|
| + ExecutionContext* context = m_scriptState->getExecutionContext();
|
| DCHECK(context);
|
| if (context->activeDOMObjectsAreSuspended() || context->activeDOMObjectsAreStopped())
|
| return false;
|
| @@ -49,19 +50,19 @@ bool VoidCallbackFunctionTypedef::call(ScriptState* scriptState, ScriptWrappable
|
| // TODO(bashi): Make sure that using TrackExceptionState is OK.
|
| // crbug.com/653769
|
| TrackExceptionState exceptionState;
|
| - ScriptState::Scope scope(scriptState);
|
| + ScriptState::Scope scope(m_scriptState.get());
|
|
|
| - v8::Local<v8::Value> argArgument = v8String(scriptState->isolate(), arg);
|
| + v8::Local<v8::Value> argArgument = v8String(m_scriptState->isolate(), arg);
|
|
|
| - v8::Local<v8::Value> thisValue = toV8(scriptWrappable, scriptState->context()->Global(), scriptState->isolate());
|
| + v8::Local<v8::Value> thisValue = toV8(scriptWrappable, m_scriptState->context()->Global(), m_scriptState->isolate());
|
|
|
| v8::Local<v8::Value> argv[] = { argArgument };
|
|
|
| v8::Local<v8::Value> v8ReturnValue;
|
| - v8::TryCatch exceptionCatcher(scriptState->isolate());
|
| + v8::TryCatch exceptionCatcher(m_scriptState->isolate());
|
| exceptionCatcher.SetVerbose(true);
|
|
|
| - if (V8ScriptRunner::callFunction(m_callback.newLocal(scriptState->isolate()), scriptState->getExecutionContext(), thisValue, 1, argv, scriptState->isolate()).ToLocal(&v8ReturnValue))
|
| + if (V8ScriptRunner::callFunction(m_callback.newLocal(m_scriptState->isolate()), m_scriptState->getExecutionContext(), thisValue, 1, argv, m_scriptState->isolate()).ToLocal(&v8ReturnValue))
|
| {
|
| return true;
|
| }
|
|
|