Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 3f6e1090a05633df5c666dededd19ab0c969157b..61f37174012b598b3f24d9e2b67c8c061da15619 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -851,38 +851,8 @@ Local<FunctionTemplate> FunctionTemplate::New( |
Local<Signature> Signature::New(Isolate* isolate, |
- Handle<FunctionTemplate> receiver, int argc, |
- Handle<FunctionTemplate> argv[]) { |
- i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
- LOG_API(i_isolate, "Signature::New"); |
- ENTER_V8(i_isolate); |
- i::Handle<i::SignatureInfo> obj = |
- 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++) { |
- if (!argv[i].IsEmpty()) |
- args->set(i, *Utils::OpenHandle(*argv[i])); |
- } |
- obj->set_args(*args); |
- } |
- return Utils::ToLocal(obj); |
-} |
- |
- |
-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); |
- // TODO(jochen): Replace SignatureInfo with FunctionTemplateInfo once the |
- // deprecated API is deleted. |
- 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); |
+ return Utils::SignatureToLocal(Utils::OpenHandle(*receiver)); |
} |