Commit c9672e28 authored by lukasza's avatar lukasza Committed by Commit bot

Rename |m_callback| to |callback_| in IDL bindings.

This CL was generated mechanically with:

$ git grep -l m_callback -- third_party/WebKit/Source | \
      xargs -n 1 sed -i -e 's/\bm_callback\b/callback_/g'

No intended behavior change.

BUG=675877

Review-Url: https://codereview.chromium.org/2858153004
Cr-Commit-Position: refs/heads/master@{#469538}
parent 84b8a5f1
...@@ -25,7 +25,7 @@ void V8ResizeObserverCallback::handleEvent( ...@@ -25,7 +25,7 @@ void V8ResizeObserverCallback::handleEvent(
return; return;
ScriptState::Scope scope(script_state_.Get()); ScriptState::Scope scope(script_state_.Get());
if (m_callback.IsEmpty()) if (callback_.IsEmpty())
return; return;
v8::Local<v8::Value> observer_handle = v8::Local<v8::Value> observer_handle =
...@@ -46,7 +46,7 @@ void V8ResizeObserverCallback::handleEvent( ...@@ -46,7 +46,7 @@ void V8ResizeObserverCallback::handleEvent(
v8::TryCatch exception_catcher(script_state_->GetIsolate()); v8::TryCatch exception_catcher(script_state_->GetIsolate());
exception_catcher.SetVerbose(true); exception_catcher.SetVerbose(true);
V8ScriptRunner::CallFunction( V8ScriptRunner::CallFunction(
m_callback.NewLocal(isolate), ExecutionContext::From(script_state_.Get()), callback_.NewLocal(isolate), ExecutionContext::From(script_state_.Get()),
this_object, WTF_ARRAY_LENGTH(argv), argv, isolate); this_object, WTF_ARRAY_LENGTH(argv), argv, isolate);
} }
......
...@@ -69,7 +69,7 @@ bool V8SQLStatementErrorCallback::handleEvent(SQLTransaction* transaction, ...@@ -69,7 +69,7 @@ bool V8SQLStatementErrorCallback::handleEvent(SQLTransaction* transaction,
// statement, if any, or onto the next overall step otherwise. Otherwise, // statement, if any, or onto the next overall step otherwise. Otherwise,
// the error callback did not return false, or there was no error callback. // the error callback did not return false, or there was no error callback.
// Jump to the last step in the overall steps. // Jump to the last step in the overall steps.
if (!V8ScriptRunner::CallFunction(m_callback.NewLocal(isolate), if (!V8ScriptRunner::CallFunction(callback_.NewLocal(isolate),
ExecutionContext::From(script_state_.Get()), ExecutionContext::From(script_state_.Get()),
script_state_->GetContext()->Global(), script_state_->GetContext()->Global(),
WTF_ARRAY_LENGTH(argv), argv, isolate) WTF_ARRAY_LENGTH(argv), argv, isolate)
......
...@@ -20,16 +20,16 @@ namespace blink { ...@@ -20,16 +20,16 @@ namespace blink {
{{cpp_class}}::{{cpp_class}}(ScriptState* scriptState, v8::Local<v8::Function> callback) {{cpp_class}}::{{cpp_class}}(ScriptState* scriptState, v8::Local<v8::Function> callback)
: script_state_(scriptState), : script_state_(scriptState),
m_callback(scriptState->GetIsolate(), this, callback) { callback_(scriptState->GetIsolate(), this, callback) {
DCHECK(!m_callback.IsEmpty()); DCHECK(!callback_.IsEmpty());
} }
DEFINE_TRACE_WRAPPERS({{cpp_class}}) { DEFINE_TRACE_WRAPPERS({{cpp_class}}) {
visitor->TraceWrappers(m_callback.Cast<v8::Value>()); visitor->TraceWrappers(callback_.Cast<v8::Value>());
} }
bool {{cpp_class}}::call({{argument_declarations | join(', ')}}) { bool {{cpp_class}}::call({{argument_declarations | join(', ')}}) {
if (m_callback.IsEmpty()) if (callback_.IsEmpty())
return false; return false;
if (!script_state_->ContextIsValid()) if (!script_state_->ContextIsValid())
...@@ -64,7 +64,7 @@ bool {{cpp_class}}::call({{argument_declarations | join(', ')}}) { ...@@ -64,7 +64,7 @@ bool {{cpp_class}}::call({{argument_declarations | join(', ')}}) {
exceptionCatcher.SetVerbose(true); exceptionCatcher.SetVerbose(true);
v8::Local<v8::Value> v8ReturnValue; v8::Local<v8::Value> v8ReturnValue;
if (!V8ScriptRunner::CallFunction(m_callback.NewLocal(isolate), if (!V8ScriptRunner::CallFunction(callback_.NewLocal(isolate),
context, context,
thisValue, thisValue,
{{arguments | length}}, {{arguments | length}},
......
...@@ -28,14 +28,14 @@ class {{exported}}{{cpp_class}} final : public GarbageCollectedFinalized<{{cpp_c ...@@ -28,14 +28,14 @@ class {{exported}}{{cpp_class}} final : public GarbageCollectedFinalized<{{cpp_c
bool call({{argument_declarations | join(', ')}}); bool call({{argument_declarations | join(', ')}});
v8::Local<v8::Function> v8Value(v8::Isolate* isolate) { v8::Local<v8::Function> v8Value(v8::Isolate* isolate) {
return m_callback.NewLocal(isolate); return callback_.NewLocal(isolate);
} }
private: private:
{{cpp_class}}(ScriptState*, v8::Local<v8::Function>); {{cpp_class}}(ScriptState*, v8::Local<v8::Function>);
RefPtr<ScriptState> script_state_; RefPtr<ScriptState> script_state_;
TraceWrapperV8Reference<v8::Function> m_callback; TraceWrapperV8Reference<v8::Function> callback_;
}; };
template <> template <>
......
...@@ -11,7 +11,7 @@ namespace blink { ...@@ -11,7 +11,7 @@ namespace blink {
{{v8_class}}::{{v8_class}}(v8::Local<v8::Function> callback, ScriptState* scriptState) {{v8_class}}::{{v8_class}}(v8::Local<v8::Function> callback, ScriptState* scriptState)
: script_state_(scriptState) { : script_state_(scriptState) {
m_callback.Set(scriptState->GetIsolate(), callback); callback_.Set(scriptState->GetIsolate(), callback);
} }
{{v8_class}}::~{{v8_class}}() {} {{v8_class}}::~{{v8_class}}() {}
...@@ -53,7 +53,7 @@ DEFINE_TRACE({{v8_class}}) { ...@@ -53,7 +53,7 @@ DEFINE_TRACE({{v8_class}}) {
{% if method.idl_type == 'boolean' %} {% if method.idl_type == 'boolean' %}
v8::TryCatch exceptionCatcher(isolate); v8::TryCatch exceptionCatcher(isolate);
exceptionCatcher.SetVerbose(true); exceptionCatcher.SetVerbose(true);
V8ScriptRunner::CallFunction(m_callback.NewLocal(isolate), V8ScriptRunner::CallFunction(callback_.NewLocal(isolate),
executionContext, executionContext,
{{this_handle_parameter}}, {{this_handle_parameter}},
{{method.arguments | length}}, {{method.arguments | length}},
...@@ -61,7 +61,7 @@ DEFINE_TRACE({{v8_class}}) { ...@@ -61,7 +61,7 @@ DEFINE_TRACE({{v8_class}}) {
isolate); isolate);
return !exceptionCatcher.HasCaught(); return !exceptionCatcher.HasCaught();
{% else %}{# void #} {% else %}{# void #}
V8ScriptRunner::CallFunction(m_callback.NewLocal(isolate), V8ScriptRunner::CallFunction(callback_.NewLocal(isolate),
ExecutionContext::From(script_state_.Get()), ExecutionContext::From(script_state_.Get()),
{{this_handle_parameter}}, {{this_handle_parameter}},
{{method.arguments | length}}, {{method.arguments | length}},
......
...@@ -27,7 +27,7 @@ class {{v8_class}} final : public {{cpp_class}} { ...@@ -27,7 +27,7 @@ class {{v8_class}} final : public {{cpp_class}} {
private: private:
{{exported}}{{v8_class}}(v8::Local<v8::Function>, ScriptState*); {{exported}}{{v8_class}}(v8::Local<v8::Function>, ScriptState*);
ScopedPersistent<v8::Function> m_callback; ScopedPersistent<v8::Function> callback_;
RefPtr<ScriptState> script_state_; RefPtr<ScriptState> script_state_;
}; };
......
...@@ -31,16 +31,16 @@ AnyCallbackFunctionOptionalAnyArg* AnyCallbackFunctionOptionalAnyArg::Create(Scr ...@@ -31,16 +31,16 @@ AnyCallbackFunctionOptionalAnyArg* AnyCallbackFunctionOptionalAnyArg::Create(Scr
AnyCallbackFunctionOptionalAnyArg::AnyCallbackFunctionOptionalAnyArg(ScriptState* scriptState, v8::Local<v8::Function> callback) AnyCallbackFunctionOptionalAnyArg::AnyCallbackFunctionOptionalAnyArg(ScriptState* scriptState, v8::Local<v8::Function> callback)
: script_state_(scriptState), : script_state_(scriptState),
m_callback(scriptState->GetIsolate(), this, callback) { callback_(scriptState->GetIsolate(), this, callback) {
DCHECK(!m_callback.IsEmpty()); DCHECK(!callback_.IsEmpty());
} }
DEFINE_TRACE_WRAPPERS(AnyCallbackFunctionOptionalAnyArg) { DEFINE_TRACE_WRAPPERS(AnyCallbackFunctionOptionalAnyArg) {
visitor->TraceWrappers(m_callback.Cast<v8::Value>()); visitor->TraceWrappers(callback_.Cast<v8::Value>());
} }
bool AnyCallbackFunctionOptionalAnyArg::call(ScriptWrappable* scriptWrappable, ScriptValue optionalAnyArg, ScriptValue& returnValue) { bool AnyCallbackFunctionOptionalAnyArg::call(ScriptWrappable* scriptWrappable, ScriptValue optionalAnyArg, ScriptValue& returnValue) {
if (m_callback.IsEmpty()) if (callback_.IsEmpty())
return false; return false;
if (!script_state_->ContextIsValid()) if (!script_state_->ContextIsValid())
...@@ -68,7 +68,7 @@ bool AnyCallbackFunctionOptionalAnyArg::call(ScriptWrappable* scriptWrappable, S ...@@ -68,7 +68,7 @@ bool AnyCallbackFunctionOptionalAnyArg::call(ScriptWrappable* scriptWrappable, S
exceptionCatcher.SetVerbose(true); exceptionCatcher.SetVerbose(true);
v8::Local<v8::Value> v8ReturnValue; v8::Local<v8::Value> v8ReturnValue;
if (!V8ScriptRunner::CallFunction(m_callback.NewLocal(isolate), if (!V8ScriptRunner::CallFunction(callback_.NewLocal(isolate),
context, context,
thisValue, thisValue,
1, 1,
......
...@@ -36,14 +36,14 @@ class CORE_EXPORT AnyCallbackFunctionOptionalAnyArg final : public GarbageCollec ...@@ -36,14 +36,14 @@ class CORE_EXPORT AnyCallbackFunctionOptionalAnyArg final : public GarbageCollec
bool call(ScriptWrappable* scriptWrappable, ScriptValue optionalAnyArg, ScriptValue& returnValue); bool call(ScriptWrappable* scriptWrappable, ScriptValue optionalAnyArg, ScriptValue& returnValue);
v8::Local<v8::Function> v8Value(v8::Isolate* isolate) { v8::Local<v8::Function> v8Value(v8::Isolate* isolate) {
return m_callback.NewLocal(isolate); return callback_.NewLocal(isolate);
} }
private: private:
AnyCallbackFunctionOptionalAnyArg(ScriptState*, v8::Local<v8::Function>); AnyCallbackFunctionOptionalAnyArg(ScriptState*, v8::Local<v8::Function>);
RefPtr<ScriptState> script_state_; RefPtr<ScriptState> script_state_;
TraceWrapperV8Reference<v8::Function> m_callback; TraceWrapperV8Reference<v8::Function> callback_;
}; };
template <> template <>
......
...@@ -32,16 +32,16 @@ LongCallbackFunction* LongCallbackFunction::Create(ScriptState* scriptState, v8: ...@@ -32,16 +32,16 @@ LongCallbackFunction* LongCallbackFunction::Create(ScriptState* scriptState, v8:
LongCallbackFunction::LongCallbackFunction(ScriptState* scriptState, v8::Local<v8::Function> callback) LongCallbackFunction::LongCallbackFunction(ScriptState* scriptState, v8::Local<v8::Function> callback)
: script_state_(scriptState), : script_state_(scriptState),
m_callback(scriptState->GetIsolate(), this, callback) { callback_(scriptState->GetIsolate(), this, callback) {
DCHECK(!m_callback.IsEmpty()); DCHECK(!callback_.IsEmpty());
} }
DEFINE_TRACE_WRAPPERS(LongCallbackFunction) { DEFINE_TRACE_WRAPPERS(LongCallbackFunction) {
visitor->TraceWrappers(m_callback.Cast<v8::Value>()); visitor->TraceWrappers(callback_.Cast<v8::Value>());
} }
bool LongCallbackFunction::call(ScriptWrappable* scriptWrappable, int32_t num1, int32_t num2, int32_t& returnValue) { bool LongCallbackFunction::call(ScriptWrappable* scriptWrappable, int32_t num1, int32_t num2, int32_t& returnValue) {
if (m_callback.IsEmpty()) if (callback_.IsEmpty())
return false; return false;
if (!script_state_->ContextIsValid()) if (!script_state_->ContextIsValid())
...@@ -70,7 +70,7 @@ bool LongCallbackFunction::call(ScriptWrappable* scriptWrappable, int32_t num1, ...@@ -70,7 +70,7 @@ bool LongCallbackFunction::call(ScriptWrappable* scriptWrappable, int32_t num1,
exceptionCatcher.SetVerbose(true); exceptionCatcher.SetVerbose(true);
v8::Local<v8::Value> v8ReturnValue; v8::Local<v8::Value> v8ReturnValue;
if (!V8ScriptRunner::CallFunction(m_callback.NewLocal(isolate), if (!V8ScriptRunner::CallFunction(callback_.NewLocal(isolate),
context, context,
thisValue, thisValue,
2, 2,
......
...@@ -36,14 +36,14 @@ class CORE_EXPORT LongCallbackFunction final : public GarbageCollectedFinalized< ...@@ -36,14 +36,14 @@ class CORE_EXPORT LongCallbackFunction final : public GarbageCollectedFinalized<
bool call(ScriptWrappable* scriptWrappable, int32_t num1, int32_t num2, int32_t& returnValue); bool call(ScriptWrappable* scriptWrappable, int32_t num1, int32_t num2, int32_t& returnValue);
v8::Local<v8::Function> v8Value(v8::Isolate* isolate) { v8::Local<v8::Function> v8Value(v8::Isolate* isolate) {
return m_callback.NewLocal(isolate); return callback_.NewLocal(isolate);
} }
private: private:
LongCallbackFunction(ScriptState*, v8::Local<v8::Function>); LongCallbackFunction(ScriptState*, v8::Local<v8::Function>);
RefPtr<ScriptState> script_state_; RefPtr<ScriptState> script_state_;
TraceWrapperV8Reference<v8::Function> m_callback; TraceWrapperV8Reference<v8::Function> callback_;
}; };
template <> template <>
......
...@@ -32,16 +32,16 @@ StringSequenceCallbackFunctionLongSequenceArg* StringSequenceCallbackFunctionLon ...@@ -32,16 +32,16 @@ StringSequenceCallbackFunctionLongSequenceArg* StringSequenceCallbackFunctionLon
StringSequenceCallbackFunctionLongSequenceArg::StringSequenceCallbackFunctionLongSequenceArg(ScriptState* scriptState, v8::Local<v8::Function> callback) StringSequenceCallbackFunctionLongSequenceArg::StringSequenceCallbackFunctionLongSequenceArg(ScriptState* scriptState, v8::Local<v8::Function> callback)
: script_state_(scriptState), : script_state_(scriptState),
m_callback(scriptState->GetIsolate(), this, callback) { callback_(scriptState->GetIsolate(), this, callback) {
DCHECK(!m_callback.IsEmpty()); DCHECK(!callback_.IsEmpty());
} }
DEFINE_TRACE_WRAPPERS(StringSequenceCallbackFunctionLongSequenceArg) { DEFINE_TRACE_WRAPPERS(StringSequenceCallbackFunctionLongSequenceArg) {
visitor->TraceWrappers(m_callback.Cast<v8::Value>()); visitor->TraceWrappers(callback_.Cast<v8::Value>());
} }
bool StringSequenceCallbackFunctionLongSequenceArg::call(ScriptWrappable* scriptWrappable, const Vector<int32_t>& arg, Vector<String>& returnValue) { bool StringSequenceCallbackFunctionLongSequenceArg::call(ScriptWrappable* scriptWrappable, const Vector<int32_t>& arg, Vector<String>& returnValue) {
if (m_callback.IsEmpty()) if (callback_.IsEmpty())
return false; return false;
if (!script_state_->ContextIsValid()) if (!script_state_->ContextIsValid())
...@@ -69,7 +69,7 @@ bool StringSequenceCallbackFunctionLongSequenceArg::call(ScriptWrappable* script ...@@ -69,7 +69,7 @@ bool StringSequenceCallbackFunctionLongSequenceArg::call(ScriptWrappable* script
exceptionCatcher.SetVerbose(true); exceptionCatcher.SetVerbose(true);
v8::Local<v8::Value> v8ReturnValue; v8::Local<v8::Value> v8ReturnValue;
if (!V8ScriptRunner::CallFunction(m_callback.NewLocal(isolate), if (!V8ScriptRunner::CallFunction(callback_.NewLocal(isolate),
context, context,
thisValue, thisValue,
1, 1,
......
...@@ -36,14 +36,14 @@ class CORE_EXPORT StringSequenceCallbackFunctionLongSequenceArg final : public G ...@@ -36,14 +36,14 @@ class CORE_EXPORT StringSequenceCallbackFunctionLongSequenceArg final : public G
bool call(ScriptWrappable* scriptWrappable, const Vector<int32_t>& arg, Vector<String>& returnValue); bool call(ScriptWrappable* scriptWrappable, const Vector<int32_t>& arg, Vector<String>& returnValue);
v8::Local<v8::Function> v8Value(v8::Isolate* isolate) { v8::Local<v8::Function> v8Value(v8::Isolate* isolate) {
return m_callback.NewLocal(isolate); return callback_.NewLocal(isolate);
} }
private: private:
StringSequenceCallbackFunctionLongSequenceArg(ScriptState*, v8::Local<v8::Function>); StringSequenceCallbackFunctionLongSequenceArg(ScriptState*, v8::Local<v8::Function>);
RefPtr<ScriptState> script_state_; RefPtr<ScriptState> script_state_;
TraceWrapperV8Reference<v8::Function> m_callback; TraceWrapperV8Reference<v8::Function> callback_;
}; };
template <> template <>
......
...@@ -25,7 +25,7 @@ namespace blink { ...@@ -25,7 +25,7 @@ namespace blink {
V8TestCallbackInterface::V8TestCallbackInterface(v8::Local<v8::Function> callback, ScriptState* scriptState) V8TestCallbackInterface::V8TestCallbackInterface(v8::Local<v8::Function> callback, ScriptState* scriptState)
: script_state_(scriptState) { : script_state_(scriptState) {
m_callback.Set(scriptState->GetIsolate(), callback); callback_.Set(scriptState->GetIsolate(), callback);
} }
V8TestCallbackInterface::~V8TestCallbackInterface() {} V8TestCallbackInterface::~V8TestCallbackInterface() {}
...@@ -48,7 +48,7 @@ void V8TestCallbackInterface::voidMethod() { ...@@ -48,7 +48,7 @@ void V8TestCallbackInterface::voidMethod() {
v8::Local<v8::Value> *argv = 0; v8::Local<v8::Value> *argv = 0;
v8::Isolate* isolate = script_state_->GetIsolate(); v8::Isolate* isolate = script_state_->GetIsolate();
V8ScriptRunner::CallFunction(m_callback.NewLocal(isolate), V8ScriptRunner::CallFunction(callback_.NewLocal(isolate),
ExecutionContext::From(script_state_.Get()), ExecutionContext::From(script_state_.Get()),
v8::Undefined(isolate), v8::Undefined(isolate),
0, 0,
...@@ -72,7 +72,7 @@ bool V8TestCallbackInterface::booleanMethod() { ...@@ -72,7 +72,7 @@ bool V8TestCallbackInterface::booleanMethod() {
v8::Isolate* isolate = script_state_->GetIsolate(); v8::Isolate* isolate = script_state_->GetIsolate();
v8::TryCatch exceptionCatcher(isolate); v8::TryCatch exceptionCatcher(isolate);
exceptionCatcher.SetVerbose(true); exceptionCatcher.SetVerbose(true);
V8ScriptRunner::CallFunction(m_callback.NewLocal(isolate), V8ScriptRunner::CallFunction(callback_.NewLocal(isolate),
executionContext, executionContext,
v8::Undefined(isolate), v8::Undefined(isolate),
0, 0,
...@@ -96,7 +96,7 @@ void V8TestCallbackInterface::voidMethodBooleanArg(bool boolArg) { ...@@ -96,7 +96,7 @@ void V8TestCallbackInterface::voidMethodBooleanArg(bool boolArg) {
v8::Local<v8::Value> argv[] = { boolArgHandle }; v8::Local<v8::Value> argv[] = { boolArgHandle };
v8::Isolate* isolate = script_state_->GetIsolate(); v8::Isolate* isolate = script_state_->GetIsolate();
V8ScriptRunner::CallFunction(m_callback.NewLocal(isolate), V8ScriptRunner::CallFunction(callback_.NewLocal(isolate),
ExecutionContext::From(script_state_.Get()), ExecutionContext::From(script_state_.Get()),
v8::Undefined(isolate), v8::Undefined(isolate),
1, 1,
...@@ -119,7 +119,7 @@ void V8TestCallbackInterface::voidMethodSequenceArg(const HeapVector<Member<Test ...@@ -119,7 +119,7 @@ void V8TestCallbackInterface::voidMethodSequenceArg(const HeapVector<Member<Test
v8::Local<v8::Value> argv[] = { sequenceArgHandle }; v8::Local<v8::Value> argv[] = { sequenceArgHandle };
v8::Isolate* isolate = script_state_->GetIsolate(); v8::Isolate* isolate = script_state_->GetIsolate();
V8ScriptRunner::CallFunction(m_callback.NewLocal(isolate), V8ScriptRunner::CallFunction(callback_.NewLocal(isolate),
ExecutionContext::From(script_state_.Get()), ExecutionContext::From(script_state_.Get()),
v8::Undefined(isolate), v8::Undefined(isolate),
1, 1,
...@@ -142,7 +142,7 @@ void V8TestCallbackInterface::voidMethodFloatArg(float floatArg) { ...@@ -142,7 +142,7 @@ void V8TestCallbackInterface::voidMethodFloatArg(float floatArg) {
v8::Local<v8::Value> argv[] = { floatArgHandle }; v8::Local<v8::Value> argv[] = { floatArgHandle };
v8::Isolate* isolate = script_state_->GetIsolate(); v8::Isolate* isolate = script_state_->GetIsolate();
V8ScriptRunner::CallFunction(m_callback.NewLocal(isolate), V8ScriptRunner::CallFunction(callback_.NewLocal(isolate),
ExecutionContext::From(script_state_.Get()), ExecutionContext::From(script_state_.Get()),
v8::Undefined(isolate), v8::Undefined(isolate),
1, 1,
...@@ -165,7 +165,7 @@ void V8TestCallbackInterface::voidMethodTestInterfaceEmptyArg(TestInterfaceEmpty ...@@ -165,7 +165,7 @@ void V8TestCallbackInterface::voidMethodTestInterfaceEmptyArg(TestInterfaceEmpty
v8::Local<v8::Value> argv[] = { testInterfaceEmptyArgHandle }; v8::Local<v8::Value> argv[] = { testInterfaceEmptyArgHandle };
v8::Isolate* isolate = script_state_->GetIsolate(); v8::Isolate* isolate = script_state_->GetIsolate();
V8ScriptRunner::CallFunction(m_callback.NewLocal(isolate), V8ScriptRunner::CallFunction(callback_.NewLocal(isolate),
ExecutionContext::From(script_state_.Get()), ExecutionContext::From(script_state_.Get()),
v8::Undefined(isolate), v8::Undefined(isolate),
1, 1,
...@@ -189,7 +189,7 @@ void V8TestCallbackInterface::voidMethodTestInterfaceEmptyStringArg(TestInterfac ...@@ -189,7 +189,7 @@ void V8TestCallbackInterface::voidMethodTestInterfaceEmptyStringArg(TestInterfac
v8::Local<v8::Value> argv[] = { testInterfaceEmptyArgHandle, stringArgHandle }; v8::Local<v8::Value> argv[] = { testInterfaceEmptyArgHandle, stringArgHandle };
v8::Isolate* isolate = script_state_->GetIsolate(); v8::Isolate* isolate = script_state_->GetIsolate();
V8ScriptRunner::CallFunction(m_callback.NewLocal(isolate), V8ScriptRunner::CallFunction(callback_.NewLocal(isolate),
ExecutionContext::From(script_state_.Get()), ExecutionContext::From(script_state_.Get()),
v8::Undefined(isolate), v8::Undefined(isolate),
2, 2,
...@@ -213,7 +213,7 @@ void V8TestCallbackInterface::callbackWithThisValueVoidMethodStringArg(ScriptVal ...@@ -213,7 +213,7 @@ void V8TestCallbackInterface::callbackWithThisValueVoidMethodStringArg(ScriptVal
v8::Local<v8::Value> argv[] = { stringArgHandle }; v8::Local<v8::Value> argv[] = { stringArgHandle };
v8::Isolate* isolate = script_state_->GetIsolate(); v8::Isolate* isolate = script_state_->GetIsolate();
V8ScriptRunner::CallFunction(m_callback.NewLocal(isolate), V8ScriptRunner::CallFunction(callback_.NewLocal(isolate),
ExecutionContext::From(script_state_.Get()), ExecutionContext::From(script_state_.Get()),
thisHandle, thisHandle,
1, 1,
......
...@@ -42,7 +42,7 @@ class V8TestCallbackInterface final : public TestCallbackInterface { ...@@ -42,7 +42,7 @@ class V8TestCallbackInterface final : public TestCallbackInterface {
private: private:
CORE_EXPORT V8TestCallbackInterface(v8::Local<v8::Function>, ScriptState*); CORE_EXPORT V8TestCallbackInterface(v8::Local<v8::Function>, ScriptState*);
ScopedPersistent<v8::Function> m_callback; ScopedPersistent<v8::Function> callback_;
RefPtr<ScriptState> script_state_; RefPtr<ScriptState> script_state_;
}; };
} }
......
...@@ -30,16 +30,16 @@ VoidCallbackFunction* VoidCallbackFunction::Create(ScriptState* scriptState, v8: ...@@ -30,16 +30,16 @@ VoidCallbackFunction* VoidCallbackFunction::Create(ScriptState* scriptState, v8:
VoidCallbackFunction::VoidCallbackFunction(ScriptState* scriptState, v8::Local<v8::Function> callback) VoidCallbackFunction::VoidCallbackFunction(ScriptState* scriptState, v8::Local<v8::Function> callback)
: script_state_(scriptState), : script_state_(scriptState),
m_callback(scriptState->GetIsolate(), this, callback) { callback_(scriptState->GetIsolate(), this, callback) {
DCHECK(!m_callback.IsEmpty()); DCHECK(!callback_.IsEmpty());
} }
DEFINE_TRACE_WRAPPERS(VoidCallbackFunction) { DEFINE_TRACE_WRAPPERS(VoidCallbackFunction) {
visitor->TraceWrappers(m_callback.Cast<v8::Value>()); visitor->TraceWrappers(callback_.Cast<v8::Value>());
} }
bool VoidCallbackFunction::call(ScriptWrappable* scriptWrappable) { bool VoidCallbackFunction::call(ScriptWrappable* scriptWrappable) {
if (m_callback.IsEmpty()) if (callback_.IsEmpty())
return false; return false;
if (!script_state_->ContextIsValid()) if (!script_state_->ContextIsValid())
...@@ -66,7 +66,7 @@ bool VoidCallbackFunction::call(ScriptWrappable* scriptWrappable) { ...@@ -66,7 +66,7 @@ bool VoidCallbackFunction::call(ScriptWrappable* scriptWrappable) {
exceptionCatcher.SetVerbose(true); exceptionCatcher.SetVerbose(true);
v8::Local<v8::Value> v8ReturnValue; v8::Local<v8::Value> v8ReturnValue;
if (!V8ScriptRunner::CallFunction(m_callback.NewLocal(isolate), if (!V8ScriptRunner::CallFunction(callback_.NewLocal(isolate),
context, context,
thisValue, thisValue,
0, 0,
......
...@@ -36,14 +36,14 @@ class CORE_EXPORT VoidCallbackFunction final : public GarbageCollectedFinalized< ...@@ -36,14 +36,14 @@ class CORE_EXPORT VoidCallbackFunction final : public GarbageCollectedFinalized<
bool call(ScriptWrappable* scriptWrappable); bool call(ScriptWrappable* scriptWrappable);
v8::Local<v8::Function> v8Value(v8::Isolate* isolate) { v8::Local<v8::Function> v8Value(v8::Isolate* isolate) {
return m_callback.NewLocal(isolate); return callback_.NewLocal(isolate);
} }
private: private:
VoidCallbackFunction(ScriptState*, v8::Local<v8::Function>); VoidCallbackFunction(ScriptState*, v8::Local<v8::Function>);
RefPtr<ScriptState> script_state_; RefPtr<ScriptState> script_state_;
TraceWrapperV8Reference<v8::Function> m_callback; TraceWrapperV8Reference<v8::Function> callback_;
}; };
template <> template <>
......
...@@ -31,16 +31,16 @@ VoidCallbackFunctionInterfaceArg* VoidCallbackFunctionInterfaceArg::Create(Scrip ...@@ -31,16 +31,16 @@ VoidCallbackFunctionInterfaceArg* VoidCallbackFunctionInterfaceArg::Create(Scrip
VoidCallbackFunctionInterfaceArg::VoidCallbackFunctionInterfaceArg(ScriptState* scriptState, v8::Local<v8::Function> callback) VoidCallbackFunctionInterfaceArg::VoidCallbackFunctionInterfaceArg(ScriptState* scriptState, v8::Local<v8::Function> callback)
: script_state_(scriptState), : script_state_(scriptState),
m_callback(scriptState->GetIsolate(), this, callback) { callback_(scriptState->GetIsolate(), this, callback) {
DCHECK(!m_callback.IsEmpty()); DCHECK(!callback_.IsEmpty());
} }
DEFINE_TRACE_WRAPPERS(VoidCallbackFunctionInterfaceArg) { DEFINE_TRACE_WRAPPERS(VoidCallbackFunctionInterfaceArg) {
visitor->TraceWrappers(m_callback.Cast<v8::Value>()); visitor->TraceWrappers(callback_.Cast<v8::Value>());
} }
bool VoidCallbackFunctionInterfaceArg::call(ScriptWrappable* scriptWrappable, HTMLDivElement* divElement) { bool VoidCallbackFunctionInterfaceArg::call(ScriptWrappable* scriptWrappable, HTMLDivElement* divElement) {
if (m_callback.IsEmpty()) if (callback_.IsEmpty())
return false; return false;
if (!script_state_->ContextIsValid()) if (!script_state_->ContextIsValid())
...@@ -68,7 +68,7 @@ bool VoidCallbackFunctionInterfaceArg::call(ScriptWrappable* scriptWrappable, HT ...@@ -68,7 +68,7 @@ bool VoidCallbackFunctionInterfaceArg::call(ScriptWrappable* scriptWrappable, HT
exceptionCatcher.SetVerbose(true); exceptionCatcher.SetVerbose(true);
v8::Local<v8::Value> v8ReturnValue; v8::Local<v8::Value> v8ReturnValue;
if (!V8ScriptRunner::CallFunction(m_callback.NewLocal(isolate), if (!V8ScriptRunner::CallFunction(callback_.NewLocal(isolate),
context, context,
thisValue, thisValue,
1, 1,
......
...@@ -37,14 +37,14 @@ class CORE_EXPORT VoidCallbackFunctionInterfaceArg final : public GarbageCollect ...@@ -37,14 +37,14 @@ class CORE_EXPORT VoidCallbackFunctionInterfaceArg final : public GarbageCollect
bool call(ScriptWrappable* scriptWrappable, HTMLDivElement* divElement); bool call(ScriptWrappable* scriptWrappable, HTMLDivElement* divElement);
v8::Local<v8::Function> v8Value(v8::Isolate* isolate) { v8::Local<v8::Function> v8Value(v8::Isolate* isolate) {
return m_callback.NewLocal(isolate); return callback_.NewLocal(isolate);
} }
private: private:
VoidCallbackFunctionInterfaceArg(ScriptState*, v8::Local<v8::Function>); VoidCallbackFunctionInterfaceArg(ScriptState*, v8::Local<v8::Function>);
RefPtr<ScriptState> script_state_; RefPtr<ScriptState> script_state_;
TraceWrapperV8Reference<v8::Function> m_callback; TraceWrapperV8Reference<v8::Function> callback_;
}; };
template <> template <>
......
...@@ -32,16 +32,16 @@ VoidCallbackFunctionTypedef* VoidCallbackFunctionTypedef::Create(ScriptState* sc ...@@ -32,16 +32,16 @@ VoidCallbackFunctionTypedef* VoidCallbackFunctionTypedef::Create(ScriptState* sc
VoidCallbackFunctionTypedef::VoidCallbackFunctionTypedef(ScriptState* scriptState, v8::Local<v8::Function> callback) VoidCallbackFunctionTypedef::VoidCallbackFunctionTypedef(ScriptState* scriptState, v8::Local<v8::Function> callback)
: script_state_(scriptState), : script_state_(scriptState),
m_callback(scriptState->GetIsolate(), this, callback) { callback_(scriptState->GetIsolate(), this, callback) {
DCHECK(!m_callback.IsEmpty()); DCHECK(!callback_.IsEmpty());
} }
DEFINE_TRACE_WRAPPERS(VoidCallbackFunctionTypedef) { DEFINE_TRACE_WRAPPERS(VoidCallbackFunctionTypedef) {
visitor->TraceWrappers(m_callback.Cast<v8::Value>()); visitor->TraceWrappers(callback_.Cast<v8::Value>());
} }
bool VoidCallbackFunctionTypedef::call(ScriptWrappable* scriptWrappable, const String& arg) { bool VoidCallbackFunctionTypedef::call(ScriptWrappable* scriptWrappable, const String& arg) {
if (m_callback.IsEmpty()) if (callback_.IsEmpty())
return false; return false;
if (!script_state_->ContextIsValid()) if (!script_state_->ContextIsValid())
...@@ -69,7 +69,7 @@ bool VoidCallbackFunctionTypedef::call(ScriptWrappable* scriptWrappable, const S ...@@ -69,7 +69,7 @@ bool VoidCallbackFunctionTypedef::call(ScriptWrappable* scriptWrappable, const S
exceptionCatcher.SetVerbose(true); exceptionCatcher.SetVerbose(true);
v8::Local<v8::Value> v8ReturnValue; v8::Local<v8::Value> v8ReturnValue;
if (!V8ScriptRunner::CallFunction(m_callback.NewLocal(isolate), if (!V8ScriptRunner::CallFunction(callback_.NewLocal(isolate),
context, context,
thisValue, thisValue,
1, 1,
......
...@@ -36,14 +36,14 @@ class CORE_EXPORT VoidCallbackFunctionTypedef final : public GarbageCollectedFin ...@@ -36,14 +36,14 @@ class CORE_EXPORT VoidCallbackFunctionTypedef final : public GarbageCollectedFin
bool call(ScriptWrappable* scriptWrappable, const String& arg); bool call(ScriptWrappable* scriptWrappable, const String& arg);
v8::Local<v8::Function> v8Value(v8::Isolate* isolate) { v8::Local<v8::Function> v8Value(v8::Isolate* isolate) {
return m_callback.NewLocal(isolate); return callback_.NewLocal(isolate);
} }
private: private:
VoidCallbackFunctionTypedef(ScriptState*, v8::Local<v8::Function>); VoidCallbackFunctionTypedef(ScriptState*, v8::Local<v8::Function>);
RefPtr<ScriptState> script_state_; RefPtr<ScriptState> script_state_;
TraceWrapperV8Reference<v8::Function> m_callback; TraceWrapperV8Reference<v8::Function> callback_;
}; };
template <> template <>
......
...@@ -30,16 +30,16 @@ VoidCallbackFunctionModules* VoidCallbackFunctionModules::Create(ScriptState* sc ...@@ -30,16 +30,16 @@ VoidCallbackFunctionModules* VoidCallbackFunctionModules::Create(ScriptState* sc
VoidCallbackFunctionModules::VoidCallbackFunctionModules(ScriptState* scriptState, v8::Local<v8::Function> callback) VoidCallbackFunctionModules::VoidCallbackFunctionModules(ScriptState* scriptState, v8::Local<v8::Function> callback)
: script_state_(scriptState), : script_state_(scriptState),
m_callback(scriptState->GetIsolate(), this, callback) { callback_(scriptState->GetIsolate(), this, callback) {
DCHECK(!m_callback.IsEmpty()); DCHECK(!callback_.IsEmpty());
} }
DEFINE_TRACE_WRAPPERS(VoidCallbackFunctionModules) { DEFINE_TRACE_WRAPPERS(VoidCallbackFunctionModules) {
visitor->TraceWrappers(m_callback.Cast<v8::Value>()); visitor->TraceWrappers(callback_.Cast<v8::Value>());
} }
bool VoidCallbackFunctionModules::call(ScriptWrappable* scriptWrappable) { bool VoidCallbackFunctionModules::call(ScriptWrappable* scriptWrappable) {
if (m_callback.IsEmpty()) if (callback_.IsEmpty())
return false; return false;
if (!script_state_->ContextIsValid()) if (!script_state_->ContextIsValid())
...@@ -66,7 +66,7 @@ bool VoidCallbackFunctionModules::call(ScriptWrappable* scriptWrappable) { ...@@ -66,7 +66,7 @@ bool VoidCallbackFunctionModules::call(ScriptWrappable* scriptWrappable) {
exceptionCatcher.SetVerbose(true); exceptionCatcher.SetVerbose(true);
v8::Local<v8::Value> v8ReturnValue; v8::Local<v8::Value> v8ReturnValue;
if (!V8ScriptRunner::CallFunction(m_callback.NewLocal(isolate), if (!V8ScriptRunner::CallFunction(callback_.NewLocal(isolate),
context, context,
thisValue, thisValue,
0, 0,
......
...@@ -36,14 +36,14 @@ class MODULES_EXPORT VoidCallbackFunctionModules final : public GarbageCollected ...@@ -36,14 +36,14 @@ class MODULES_EXPORT VoidCallbackFunctionModules final : public GarbageCollected
bool call(ScriptWrappable* scriptWrappable); bool call(ScriptWrappable* scriptWrappable);
v8::Local<v8::Function> v8Value(v8::Isolate* isolate) { v8::Local<v8::Function> v8Value(v8::Isolate* isolate) {
return m_callback.NewLocal(isolate); return callback_.NewLocal(isolate);
} }
private: private:
VoidCallbackFunctionModules(ScriptState*, v8::Local<v8::Function>); VoidCallbackFunctionModules(ScriptState*, v8::Local<v8::Function>);
RefPtr<ScriptState> script_state_; RefPtr<ScriptState> script_state_;
TraceWrapperV8Reference<v8::Function> m_callback; TraceWrapperV8Reference<v8::Function> callback_;
}; };
template <> template <>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment