| Index: third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl
|
| diff --git a/third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl
|
| index ccf2c5d782c48881e86f51e95972dcb01bea7ae9..14aee7e2e89249e6982165e65c05297de2467ec2 100644
|
| --- a/third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl
|
| +++ b/third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl
|
| @@ -12,46 +12,46 @@
|
| namespace blink {
|
|
|
| // static
|
| -{{cpp_class}}* {{cpp_class}}::create(ScriptState* scriptState, v8::Local<v8::Value> callback){
|
| - if (isUndefinedOrNull(callback))
|
| +{{cpp_class}}* {{cpp_class}}::Create(ScriptState* scriptState, v8::Local<v8::Value> callback){
|
| + if (IsUndefinedOrNull(callback))
|
| return nullptr;
|
| return new {{cpp_class}}(scriptState, v8::Local<v8::Function>::Cast(callback));
|
| }
|
|
|
| {{cpp_class}}::{{cpp_class}}(ScriptState* scriptState, v8::Local<v8::Function> callback)
|
| : m_scriptState(scriptState),
|
| - m_callback(scriptState->isolate(), this, callback) {
|
| - DCHECK(!m_callback.isEmpty());
|
| + m_callback(scriptState->GetIsolate(), this, callback) {
|
| + DCHECK(!m_callback.IsEmpty());
|
| }
|
|
|
| DEFINE_TRACE({{cpp_class}}) {}
|
|
|
| DEFINE_TRACE_WRAPPERS({{cpp_class}}) {
|
| - visitor->traceWrappers(m_callback.cast<v8::Value>());
|
| + visitor->TraceWrappers(m_callback.Cast<v8::Value>());
|
| }
|
|
|
| bool {{cpp_class}}::call({{argument_declarations | join(', ')}}) {
|
| - if (!m_scriptState->contextIsValid())
|
| + if (!m_scriptState->ContextIsValid())
|
| return false;
|
|
|
| - ExecutionContext* context = m_scriptState->getExecutionContext();
|
| + ExecutionContext* context = m_scriptState->GetExecutionContext();
|
| DCHECK(context);
|
| - if (context->isContextSuspended() || context->isContextDestroyed())
|
| + if (context->IsContextSuspended() || context->IsContextDestroyed())
|
| return false;
|
|
|
| - if (m_callback.isEmpty())
|
| + if (m_callback.IsEmpty())
|
| return false;
|
|
|
| // TODO(bashi): Make sure that using DummyExceptionStateForTesting is OK.
|
| // crbug.com/653769
|
| DummyExceptionStateForTesting exceptionState;
|
| - ScriptState::Scope scope(m_scriptState.get());
|
| + ScriptState::Scope scope(m_scriptState.Get());
|
|
|
| {% for argument in arguments %}
|
| v8::Local<v8::Value> {{argument.argument_name}} = {{argument.cpp_value_to_v8_value}};
|
| {% endfor %}
|
|
|
| - v8::Local<v8::Value> thisValue = ToV8(scriptWrappable, m_scriptState->context()->Global(), m_scriptState->isolate());
|
| + v8::Local<v8::Value> thisValue = ToV8(scriptWrappable, m_scriptState->GetContext()->Global(), m_scriptState->GetIsolate());
|
|
|
| {% if arguments %}
|
| v8::Local<v8::Value> argv[] = { {{arguments | join(', ', 'argument_name')}} };
|
| @@ -61,10 +61,10 @@ bool {{cpp_class}}::call({{argument_declarations | join(', ')}}) {
|
| {% endif %}
|
|
|
| v8::Local<v8::Value> v8ReturnValue;
|
| - v8::TryCatch exceptionCatcher(m_scriptState->isolate());
|
| + v8::TryCatch exceptionCatcher(m_scriptState->GetIsolate());
|
| exceptionCatcher.SetVerbose(true);
|
|
|
| - if (V8ScriptRunner::callFunction(m_callback.newLocal(m_scriptState->isolate()), m_scriptState->getExecutionContext(), thisValue, {{arguments | length}}, argv, m_scriptState->isolate()).ToLocal(&v8ReturnValue)) {
|
| + if (V8ScriptRunner::CallFunction(m_callback.NewLocal(m_scriptState->GetIsolate()), m_scriptState->GetExecutionContext(), thisValue, {{arguments | length}}, argv, m_scriptState->GetIsolate()).ToLocal(&v8ReturnValue)) {
|
| {% if return_value %}
|
| {{v8_value_to_local_cpp_value(return_value) | indent(8)}}
|
| returnValue = cppValue;
|
|
|