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

Unified Diff: sdk/lib/_internal/pub/lib/src/utils.dart

Issue 14452004: Fix mirror usage in pub test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/utils.dart
diff --git a/sdk/lib/_internal/pub/lib/src/utils.dart b/sdk/lib/_internal/pub/lib/src/utils.dart
index 5894b99ac3c5bd4b3ec3e94755469720f03a9e79..c631381c383cb9c855160a362551fa22fd38461a 100644
--- a/sdk/lib/_internal/pub/lib/src/utils.dart
+++ b/sdk/lib/_internal/pub/lib/src/utils.dart
@@ -363,8 +363,10 @@ Future awaitObject(object) {
/// Returns the path to the library named [libraryName]. The library name must
/// be globally unique, or the wrong library path may be returned.
-String libraryPath(String libraryName) =>
- fileUriToPath(currentMirrorSystem().libraries[new Symbol(libraryName)].uri);
+String libraryPath(String libraryName) {
+ var libraries = currentMirrorSystem().findLibrary(new Symbol(libraryName));
+ return fileUriToPath(libraries.single.uri);
+}
/// Converts a `file:` [Uri] to a local path string.
String fileUriToPath(Uri uri) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698