 Chromium Code Reviews
 Chromium Code Reviews Issue 1407313004:
  Adds the possibility of setting a Code object as the callback of a FunctionTemplate.  (Closed) 
  Base URL: https://chromium.googlesource.com/v8/v8.git@master
    
  
    Issue 1407313004:
  Adds the possibility of setting a Code object as the callback of a FunctionTemplate.  (Closed) 
  Base URL: https://chromium.googlesource.com/v8/v8.git@master| Index: include/v8.h | 
| diff --git a/include/v8.h b/include/v8.h | 
| index 66c3043b4aa75f4dda797c749195d22d01ed3511..0f6406ccc2f26959cfa2af945ccdc4f6c364ee83 100644 | 
| --- a/include/v8.h | 
| +++ b/include/v8.h | 
| @@ -4422,6 +4422,14 @@ class V8_EXPORT FunctionTemplate : public Template { | 
| Local<Value> data = Local<Value>(), | 
| Local<Signature> signature = Local<Signature>(), int length = 0); | 
| +#ifdef V8_FAST_ACCESSORS | 
| + /** Creates a function template with a code object. */ | 
| + static Local<FunctionTemplate> New( | 
| + Isolate* isolate, Local<Value> fast_handler, FunctionCallback callback, | 
| 
vogelheim
2015/11/18 17:30:05
nitpick: Wouldn't it make more sense to have fast_
 
epertoso
2015/11/20 15:27:13
Resolved according to the offline discussion we ha
 | 
| + Local<Value> data = Local<Value>(), | 
| + Local<Signature> signature = Local<Signature>(), int length = 0); | 
| +#endif | 
| + | 
| /** 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( | 
| @@ -4433,7 +4441,8 @@ class V8_EXPORT FunctionTemplate : public Template { | 
| * FunctionTemplate is called. | 
| */ | 
| void SetCallHandler(FunctionCallback callback, | 
| - Local<Value> data = Local<Value>()); | 
| + Local<Value> data = Local<Value>(), | 
| + Local<Value> fast_handler = Local<Value>()); | 
| 
vogelheim
2015/11/18 17:30:05
The FunctionTemplate::New version is #ifdef-ed, bu
 
epertoso
2015/11/20 15:27:13
Removed the #ifdefs.
 | 
| /** Set the predefined length property for the FunctionTemplate. */ | 
| void SetLength(int length); |