Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 0a6d25baebb27cc4859918703f7540622f45cf32..11d0a40de018576fb70c6870111879cf05174387 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -1053,7 +1053,7 @@ void FunctionTemplate::Inherit(v8::Handle<FunctionTemplate> value) { |
Local<FunctionTemplate> FunctionTemplate::New(InvocationCallback callback, |
- v8::Handle<Value> data, v8::Handle<Signature> signature) { |
+ v8::Handle<Value> data, v8::Handle<Signature> signature, int length) { |
i::Isolate* isolate = i::Isolate::Current(); |
EnsureInitializedForIsolate(isolate, "v8::FunctionTemplate::New()"); |
LOG_API(isolate, "FunctionTemplate::New"); |
@@ -1070,6 +1070,7 @@ Local<FunctionTemplate> FunctionTemplate::New(InvocationCallback callback, |
if (data.IsEmpty()) data = v8::Undefined(); |
Utils::ToLocal(obj)->SetCallHandler(callback, data); |
} |
+ obj->set_length(length); |
obj->set_undetectable(false); |
obj->set_needs_access_check(false); |
@@ -1240,6 +1241,14 @@ Local<ObjectTemplate> FunctionTemplate::InstanceTemplate() { |
} |
+void FunctionTemplate::SetLength(int length) { |
+ i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
+ if (IsDeadCheck(isolate, "v8::FunctionTemplate::SetLength()")) return; |
+ ENTER_V8(isolate); |
+ Utils::OpenHandle(this)->set_length(length); |
+} |
+ |
+ |
void FunctionTemplate::SetClassName(Handle<String> name) { |
i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
if (IsDeadCheck(isolate, "v8::FunctionTemplate::SetClassName()")) return; |