Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index be838c2b22045f6fcaaf527012118ef645153b61..2fce3ab6dd00250a6a4e672da1835c82f38f794c 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -2361,11 +2361,23 @@ class V8_EXPORT Array : public Object { |
}; |
+typedef void (*FunctionCallback)(const FunctionCallbackInfo<Value>& info); |
+ |
+ |
/** |
* A JavaScript function object (ECMA-262, 15.3). |
*/ |
class V8_EXPORT Function : public Object { |
public: |
+ /** |
+ * Create a function in the current execution context |
+ * for a given FunctionCallback. |
+ */ |
+ static Local<Function> New(Isolate* isolate, |
+ FunctionCallback callback, |
+ Local<Value> data = Local<Value>(), |
+ int length = 0); |
+ |
Local<Object> NewInstance() const; |
Local<Object> NewInstance(int argc, Handle<Value> argv[]) const; |
Local<Value> Call(Handle<Object> recv, int argc, Handle<Value> argv[]); |
@@ -3140,8 +3152,6 @@ class PropertyCallbackInfo { |
}; |
-typedef void (*FunctionCallback)(const FunctionCallbackInfo<Value>& info); |
- |
/** |
* NamedProperty[Getter|Setter] are used as interceptors on object. |
* See ObjectTemplate::SetNamedPropertyHandler. |