| Index: third_party/WebKit/Source/bindings/core/v8/ScriptFunction.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptFunction.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptFunction.cpp
|
| index 41d5aac5845b515c65dcae0af2d422b5c29af2f2..c5c313e89fa6b440ab7f5eb5432536608a71c971 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/ScriptFunction.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/ScriptFunction.cpp
|
| @@ -10,10 +10,15 @@ namespace blink {
|
|
|
| v8::Local<v8::Function> ScriptFunction::bindToV8Function()
|
| {
|
| +#if ENABLE(ASSERT)
|
| + DCHECK(!m_bindToV8FunctionAlreadyCalled);
|
| + m_bindToV8FunctionAlreadyCalled = true;
|
| +#endif
|
| +
|
| v8::Isolate* isolate = m_scriptState->isolate();
|
| v8::Local<v8::External> wrapper = v8::External::New(isolate, this);
|
| m_scriptState->world().registerDOMObjectHolder(isolate, this, wrapper);
|
| - return createClosure(&ScriptFunction::callCallback, wrapper, isolate);
|
| + return v8::Function::New(m_scriptState->context(), callCallback, wrapper, 0, v8::ConstructorBehavior::kThrow).ToLocalChecked();
|
| }
|
|
|
| void ScriptFunction::callCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
|
|
|