Chromium Code Reviews| Index: src/api.cc |
| diff --git a/src/api.cc b/src/api.cc |
| index 03d79a54b23d3ad69fb5ed6e73bb325d343cbe2a..89d9b7cff5cc99bc3a51e042998ed7181d83c589 100644 |
| --- a/src/api.cc |
| +++ b/src/api.cc |
| @@ -856,11 +856,8 @@ Local<Signature> Signature::New(Isolate* isolate, |
| i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
| LOG_API(i_isolate, "Signature::New"); |
| ENTER_V8(i_isolate); |
| - i::Handle<i::Struct> struct_obj = |
| - i_isolate->factory()->NewStruct(i::SIGNATURE_INFO_TYPE); |
| i::Handle<i::SignatureInfo> obj = |
|
dcarney
2015/01/14 14:09:46
need a TODO to convert SignatureInfo to FunctionTe
|
| - i::Handle<i::SignatureInfo>::cast(struct_obj); |
| - if (!receiver.IsEmpty()) obj->set_receiver(*Utils::OpenHandle(*receiver)); |
| + Utils::OpenHandle(*Signature::New(isolate, receiver)); |
| if (argc > 0) { |
| i::Handle<i::FixedArray> args = i_isolate->factory()->NewFixedArray(argc); |
| for (int i = 0; i < argc; i++) { |
| @@ -873,6 +870,20 @@ Local<Signature> Signature::New(Isolate* isolate, |
| } |
| +Local<Signature> Signature::New(Isolate* isolate, |
| + Handle<FunctionTemplate> receiver) { |
| + i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
| + LOG_API(i_isolate, "Signature::New"); |
| + ENTER_V8(i_isolate); |
| + i::Handle<i::Struct> struct_obj = |
| + i_isolate->factory()->NewStruct(i::SIGNATURE_INFO_TYPE); |
| + i::Handle<i::SignatureInfo> obj = |
| + i::Handle<i::SignatureInfo>::cast(struct_obj); |
| + if (!receiver.IsEmpty()) obj->set_receiver(*Utils::OpenHandle(*receiver)); |
| + return Utils::ToLocal(obj); |
| +} |
| + |
| + |
| Local<AccessorSignature> AccessorSignature::New( |
| Isolate* isolate, |
| Handle<FunctionTemplate> receiver) { |