Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptFunction.cpp

Issue 2173843002: binding: Removes createClosure(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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)
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ScriptFunction.h ('k') | third_party/WebKit/Source/bindings/core/v8/V8Binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698