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 |