Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index 97ba34d496a1741c7ba0d986547d06bc494ebfc0..b2198f7f2f6eb07bce2af89d16f7212f4c9b3201 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -136,6 +136,10 @@ class CallHandlerHelper; |
class EscapableHandleScope; |
template<typename T> class ReturnValue; |
+namespace experimental { |
+class FastAccessorBuilder; |
+} // namespace experimental |
+ |
namespace internal { |
class Arguments; |
class Heap; |
@@ -4417,6 +4421,16 @@ class V8_EXPORT FunctionTemplate : public Template { |
* the callback cannot be null. |
*/ |
static Local<FunctionTemplate> NewWithFastHandler( |
+ Isolate* isolate, FunctionCallback callback, |
+ experimental::FastAccessorBuilder* fast_handler = nullptr, |
+ Local<Value> data = Local<Value>(), |
+ Local<Signature> signature = Local<Signature>(), int length = 0); |
+ |
+ /** |
+ * Creates a function template with a fast handler. If a fast handler is set, |
+ * the callback cannot be null. |
+ */ |
+ static Local<FunctionTemplate> NewWithFastHandler( |
Isolate* isolate, FunctionCallback callback, Local<Value> fast_handler, |
Local<Value> data = Local<Value>(), |
Local<Signature> signature = Local<Signature>(), int length = 0); |
@@ -4431,9 +4445,9 @@ class V8_EXPORT FunctionTemplate : public Template { |
* callback is called whenever the function created from this |
* FunctionTemplate is called. |
*/ |
- void SetCallHandler(FunctionCallback callback, |
- Local<Value> data = Local<Value>(), |
- Local<Value> fast_handler = Local<Value>()); |
+ void SetCallHandler( |
+ FunctionCallback callback, Local<Value> data = Local<Value>(), |
+ experimental::FastAccessorBuilder* fast_handler = nullptr); |
/** Set the predefined length property for the FunctionTemplate. */ |
void SetLength(int length); |