| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index 22228c4e8b175b67db90b04b0089e023280822cc..1c2a2616f294acda876c4ee3f97e9ce407b2910a 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -1076,6 +1076,7 @@ Local<FunctionTemplate> FunctionTemplate::New(
|
| obj->set_length(length);
|
| obj->set_undetectable(false);
|
| obj->set_needs_access_check(false);
|
| + obj->set_do_not_cache(false);
|
|
|
| if (!signature.IsEmpty())
|
| obj->set_signature(*Utils::OpenHandle(*signature));
|
| @@ -4189,6 +4190,18 @@ Local<v8::Value> Object::CallAsConstructor(int argc,
|
| }
|
|
|
|
|
| +Local<Function> Function::New(Isolate* v8_isolate,
|
| + FunctionCallback callback,
|
| + Local<Value> data,
|
| + int length) {
|
| + HandleScope scope(reinterpret_cast<Isolate*>(v8_isolate));
|
| + Local<FunctionTemplate> info =
|
| + FunctionTemplate::New(callback, data, Local<Signature>(), length);
|
| + Utils::OpenHandle(*info)->set_do_not_cache(true);
|
| + return scope.Close(info->GetFunction());
|
| +}
|
| +
|
| +
|
| Local<v8::Object> Function::NewInstance() const {
|
| return NewInstance(0, NULL);
|
| }
|
|
|