Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: src/api.cc

Issue 855903002: remove SignatureInfo class (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/api.h ('k') | src/builtins.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « src/api.h ('k') | src/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698