Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(410)

Unified Diff: include/v8.h

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
Patch Set: Update. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/features.gypi ('k') | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 53db6ea6a0401a26a5a6817ecda3e2f18ac600cf..61dd3a6a915092f4061ecd9964eb2e40b1e0a43a 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -4411,6 +4411,15 @@ class V8_EXPORT FunctionTemplate : public Template {
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);
+
/** 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(
@@ -4422,7 +4431,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>());
/** Set the predefined length property for the FunctionTemplate. */
void SetLength(int length);
« no previous file with comments | « build/features.gypi ('k') | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698