Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index edba8eaece01ae12955c89426ef8c57edf7a973d..0eee7f6da7255f4390e03148b3c2fa2409a314d6 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -4564,6 +4564,8 @@ class V8_EXPORT Template : public Data { |
*/ |
void Set(Local<Name> name, Local<Data> value, |
PropertyAttribute attributes = None); |
+ void SetPrivate(Local<Private> name, Local<Data> value, |
+ PropertyAttribute attributes = None); |
V8_INLINE void Set(Isolate* isolate, const char* name, Local<Data> value); |
void SetAccessorProperty( |
@@ -5036,6 +5038,14 @@ class V8_EXPORT FunctionTemplate : public Template { |
Local<Value> data = Local<Value>(), |
Local<Signature> signature = Local<Signature>(), int length = 0); |
+ /** |
+ * Creates a function template backed/cached by a private property. |
+ */ |
+ static Local<FunctionTemplate> NewWithCache( |
+ Isolate* isolate, FunctionCallback callback, |
+ Local<Private> cache_property, Local<Value> data = Local<Value>(), |
+ Local<Signature> signature = Local<Signature>(), int length = 0); |
+ |
/** Returns the unique function instance in the current execution context.*/ |
V8_DEPRECATE_SOON("Use maybe version", Local<Function> GetFunction()); |
V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction( |