Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index c24445f0d94e27c50909afc111637724e60388ea..e988b95811d8216c37eeef40d415637cd55b8b96 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -4634,6 +4634,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( |
@@ -5114,6 +5116,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( |