Chromium Code Reviews| Index: src/api.cc |
| diff --git a/src/api.cc b/src/api.cc |
| index 0a6d25baebb27cc4859918703f7540622f45cf32..4966f9b1d9758eab0ab66641d40460174f8e2e9b 100644 |
| --- a/src/api.cc |
| +++ b/src/api.cc |
| @@ -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(0); |
|
Yang
2012/12/19 09:14:45
We have this Signature object (third argument in t
rossberg
2012/12/19 10:21:50
Interesting idea. But as discussed offline, it's p
|
| 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; |