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

Unified Diff: runtime/vm/debugger_api_impl.cc

Issue 10014002: Rename Api::NewLocalHandle -> Api::NewHandle. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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 | « runtime/vm/dart_api_state.h ('k') | runtime/vm/native_entry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger_api_impl.cc
===================================================================
--- runtime/vm/debugger_api_impl.cc (revision 6193)
+++ runtime/vm/debugger_api_impl.cc (working copy)
@@ -93,12 +93,10 @@
DARTSCOPE(isolate);
CHECK_AND_CAST(ActivationFrame, frame, activation_frame);
if (function_name != NULL) {
- const String& name = String::Handle(frame->QualifiedFunctionName());
- *function_name = Api::NewLocalHandle(isolate, name);
+ *function_name = Api::NewHandle(isolate, frame->QualifiedFunctionName());
}
if (script_url != NULL) {
- const String& url = String::Handle(frame->SourceUrl());
- *script_url = Api::NewLocalHandle(isolate, url);
+ *script_url = Api::NewHandle(isolate, frame->SourceUrl());
}
if (line_number != NULL) {
*line_number = frame->LineNumber();
@@ -112,8 +110,7 @@
Isolate* isolate = Isolate::Current();
DARTSCOPE(isolate);
CHECK_AND_CAST(ActivationFrame, frame, activation_frame);
- const Array& variables = Array::Handle(frame->GetLocalVariables());
- return Api::NewLocalHandle(isolate, variables);
+ return Api::NewHandle(isolate, frame->GetLocalVariables());
}
@@ -245,9 +242,7 @@
DARTSCOPE(isolate);
Instance& obj = Instance::Handle();
UNWRAP_AND_CHECK_PARAM(Instance, obj, object_in);
- Array& fields = Array::Handle();
- fields = isolate->debugger()->GetInstanceFields(obj);
- return Api::NewLocalHandle(isolate, fields);
+ return Api::NewHandle(isolate, isolate->debugger()->GetInstanceFields(obj));
}
@@ -256,9 +251,7 @@
DARTSCOPE(isolate);
Class& cls = Class::Handle();
UNWRAP_AND_CHECK_PARAM(Class, cls, cls_in);
- Array& fields = Array::Handle();
- fields = isolate->debugger()->GetStaticFields(cls);
- return Api::NewLocalHandle(isolate, fields);
+ return Api::NewHandle(isolate, isolate->debugger()->GetStaticFields(cls));
}
@@ -267,8 +260,7 @@
DARTSCOPE(isolate);
Instance& obj = Instance::Handle();
UNWRAP_AND_CHECK_PARAM(Instance, obj, object_in);
- const Class& cls = Class::Handle(obj.clazz());
- return Api::NewLocalHandle(isolate, cls);
+ return Api::NewHandle(isolate, obj.clazz());
}
@@ -277,8 +269,7 @@
DARTSCOPE(isolate);
Class& cls = Class::Handle();
UNWRAP_AND_CHECK_PARAM(Class, cls, cls_in);
- cls = cls.SuperClass();
- return Api::NewLocalHandle(isolate, cls);
+ return Api::NewHandle(isolate, cls.SuperClass());
}
@@ -305,8 +296,7 @@
library_url.ToCString());
}
- const String& source = String::Handle(script.source());
- return Api::NewLocalHandle(isolate, source);
+ return Api::NewHandle(isolate, script.source());
}
@@ -332,7 +322,7 @@
url = script.url();
script_list.SetAt(i, url);
}
- return Api::NewLocalHandle(isolate, script_list);
+ return Api::NewHandle(isolate, script_list.raw());
}
@@ -360,7 +350,7 @@
library_list.SetAt(i, lib_url);
lib = lib.next_registered();
}
- return Api::NewLocalHandle(isolate, library_list);
+ return Api::NewHandle(isolate, library_list.raw());
}
} // namespace dart
« no previous file with comments | « runtime/vm/dart_api_state.h ('k') | runtime/vm/native_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698