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

Unified Diff: runtime/vm/debugger_api_impl.cc

Issue 49613002: Fix to asiva's code review comments on TBR Cl. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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/include/dart_mirrors_api.h ('k') | runtime/vm/mirrors_api_impl.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
diff --git a/runtime/vm/debugger_api_impl.cc b/runtime/vm/debugger_api_impl.cc
index 3ffff4a21679cd219f095dbeb5ac19346385d69b..c20bf670a12307a11a992be55ababd04ab5b44e7 100644
--- a/runtime/vm/debugger_api_impl.cc
+++ b/runtime/vm/debugger_api_impl.cc
@@ -796,6 +796,22 @@ DART_EXPORT Dart_Handle Dart_GetLibraryFromId(intptr_t library_id) {
}
+DART_EXPORT Dart_Handle Dart_LibraryId(Dart_Handle library,
+ intptr_t* library_id) {
+ Isolate* isolate = Isolate::Current();
+ DARTSCOPE(isolate);
+ const Library& lib = Api::UnwrapLibraryHandle(isolate, library);
+ if (lib.IsNull()) {
+ RETURN_TYPE_ERROR(isolate, library, Library);
+ }
+ if (library_id == NULL) {
+ RETURN_NULL_ERROR(library_id);
+ }
+ *library_id = lib.index();
+ return Api::Success();
+}
+
+
DART_EXPORT Dart_Handle Dart_GetLibraryImports(intptr_t library_id) {
Isolate* isolate = Isolate::Current();
ASSERT(isolate != NULL);
« no previous file with comments | « runtime/include/dart_mirrors_api.h ('k') | runtime/vm/mirrors_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698