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

Unified Diff: include/v8.h

Issue 11631002: Extend API to allow setting length property for function templates. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Support length as argument to FunctionTempalte::New Created 8 years 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') | 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 eb0b552f605dc196f0329cb4c8ed46c00304621b..b35500dd5e3712f843ad8847cef404a40eb0896a 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -2302,7 +2302,8 @@ class V8EXPORT FunctionTemplate : public Template {
static Local<FunctionTemplate> New(
InvocationCallback callback = 0,
Handle<Value> data = Handle<Value>(),
- Handle<Signature> signature = Handle<Signature>());
+ Handle<Signature> signature = Handle<Signature>(),
+ int length = 0);
/** Returns the unique function instance in the current execution context.*/
Local<Function> GetFunction();
@@ -2314,6 +2315,9 @@ class V8EXPORT FunctionTemplate : public Template {
void SetCallHandler(InvocationCallback callback,
Handle<Value> data = Handle<Value>());
+ /** Set the predefined length property for the FunctionTemplate. */
+ void SetLength(int length);
+
/** Get the InstanceTemplate. */
Local<ObjectTemplate> InstanceTemplate();
@@ -2326,7 +2330,6 @@ class V8EXPORT FunctionTemplate : public Template {
*/
Local<ObjectTemplate> PrototypeTemplate();
-
/**
* Set the class name of the FunctionTemplate. This is used for
* printing objects created with the function created from the
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698