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

Unified Diff: Source/bindings/v8/V8Binding.h

Issue 18452009: Move createClosure from V8PromiseCustom.cpp to V8Binding.h (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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
« no previous file with comments | « no previous file | Source/bindings/v8/custom/V8PromiseCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8Binding.h
diff --git a/Source/bindings/v8/V8Binding.h b/Source/bindings/v8/V8Binding.h
index ad57ae15830bbf3751e4701907a327a61d407a55..140d4a15bb664daba5a9c9f11beec6e0d130d3ef 100644
--- a/Source/bindings/v8/V8Binding.h
+++ b/Source/bindings/v8/V8Binding.h
@@ -579,6 +579,12 @@ namespace WebCore {
return *handle;
}
+ // Attaches |environment| to |function| and returns it.
+ inline v8::Local<v8::Function> createClosure(v8::FunctionCallback function, v8::Handle<v8::Value> environment)
+ {
+ return v8::FunctionTemplate::New(function, environment)->GetFunction();
+ }
+
} // namespace WebCore
#endif // V8Binding_h
« no previous file with comments | « no previous file | Source/bindings/v8/custom/V8PromiseCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698