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

Unified Diff: runtime/lib/mirrors.cc

Issue 14178010: Change libraries map to use Uri. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Test updated Created 7 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 | « no previous file | runtime/lib/mirrors_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/mirrors.cc
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
index 31c1f4eb60d617ae986ba40ae827c6e2832ae31d..45ddc754d247b40d84b37a33ddd4bee11f185837 100644
--- a/runtime/lib/mirrors.cc
+++ b/runtime/lib/mirrors.cc
@@ -272,7 +272,7 @@ static Dart_Handle CreateLazyMirror(Dart_Handle target) {
if (Dart_IsLibrary(target)) {
Dart_Handle cls_name = NewString("_LazyLibraryMirror");
Dart_Handle cls = Dart_GetClass(MirrorLib(), cls_name);
- Dart_Handle args[] = { Dart_LibraryName(target) };
+ Dart_Handle args[] = { Dart_LibraryUrl(target) };
return Dart_New(cls, Dart_Null(), ARRAY_SIZE(args), args);
}
@@ -296,13 +296,13 @@ static Dart_Handle CreateLazyMirror(Dart_Handle target) {
Dart_Handle cls_name = NewString("_LazyTypeMirror");
Dart_Handle cls = Dart_GetClass(MirrorLib(), cls_name);
Dart_Handle lib = Dart_ClassGetLibrary(target);
- Dart_Handle lib_name;
+ Dart_Handle lib_url;
if (Dart_IsNull(lib)) {
- lib_name = Dart_Null();
+ lib_url = Dart_Null();
} else {
- lib_name = Dart_LibraryName(lib);
+ lib_url = Dart_LibraryUrl(lib);
}
- Dart_Handle args[] = { lib_name, Dart_ClassName(target) };
+ Dart_Handle args[] = { lib_url, Dart_ClassName(target) };
return Dart_New(cls, Dart_Null(), ARRAY_SIZE(args), args);
}
}
@@ -871,13 +871,11 @@ static Dart_Handle CreateLibrariesMap() {
if (Dart_IsError(lib)) {
return lib;
}
- Dart_Handle lib_key = Dart_LibraryName(lib);
Dart_Handle lib_mirror = CreateLibraryMirror(lib);
if (Dart_IsError(lib_mirror)) {
return lib_mirror;
}
- // TODO(turnidge): Check for duplicate library names.
- result = MapAdd(map, lib_key, lib_mirror);
+ result = MapAdd(map, lib_url, lib_mirror);
}
return map;
}
« no previous file with comments | « no previous file | runtime/lib/mirrors_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698