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

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: 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 | « no previous file | src/api.cc » ('j') | src/execution.cc » ('J')
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 66c3043b4aa75f4dda797c749195d22d01ed3511..1cfa557d16b0ec87064783e3fc9d991a64e33424 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_JS_ACCESSORS
+ /** Creates a function template with a code object. */
+ static Local<FunctionTemplate> New(
+ Isolate* isolate, Local<Value> code,
+ 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(
@@ -4434,6 +4442,10 @@ class V8_EXPORT FunctionTemplate : public Template {
*/
void SetCallHandler(FunctionCallback callback,
Local<Value> data = Local<Value>());
+#ifdef V8_JS_ACCESSORS
+ void SetCallHandler(Local<Value> code,
+ Local<Value> data = Local<Value>());
+#endif
/** Set the predefined length property for the FunctionTemplate. */
void SetLength(int length);
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/execution.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698