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

Unified Diff: runtime/lib/mirrors_patch.dart

Issue 61753019: Allow creation of public symbols using MirrorSystem.getSymbol when passing a null library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 | tests/lib/mirrors/private_symbol_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/mirrors_patch.dart
diff --git a/runtime/lib/mirrors_patch.dart b/runtime/lib/mirrors_patch.dart
index 06eb5585a1462aec1945e47311b4d8dd5e72bca1..6f3c43609cc6847af7e59ba45b87cb7d66ac5202 100644
--- a/runtime/lib/mirrors_patch.dart
+++ b/runtime/lib/mirrors_patch.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-import "dart:nativewrappers";
rmacnak 2013/11/20 00:27:46 We haven't needed this since the introduction of M
// TODO(ahe): Move _symbol_dev.Symbol to its own "private" library?
import "dart:_collection-dev" as _symbol_dev;
@@ -78,7 +77,7 @@ patch class MirrorSystem {
}
/* patch */ static Symbol getSymbol(String name, [LibraryMirror library]) {
- if (library is! LibraryMirror ||
+ if ((library != null && library is! _LocalLibraryMirror) ||
ahe 2013/11/21 09:07:02 Why are you checking for is! _LocalLibraryMirror?
((name.length > 0) && (name[0] == '_') && (library == null))) {
throw new ArgumentError(library);
}
« no previous file with comments | « no previous file | tests/lib/mirrors/private_symbol_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698