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

Unified Diff: runtime/vm/object.cc

Issue 23613006: Do not export library prefix names used in a library (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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 | tests/language/prefix24_lib1.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 27065)
+++ runtime/vm/object.cc (working copy)
@@ -7693,11 +7693,12 @@
intptr_t ignore = 0;
// Lookup the name in the library's symbols.
Object& obj = Object::Handle(isolate, lib.LookupEntry(name, &ignore));
- if (obj.IsNull()) {
+ // Library prefixes are not exported.
+ if (obj.IsNull() || obj.IsLibraryPrefix()) {
// Lookup in the re-exported symbols.
obj = lib.LookupExport(name);
Ivan Posva 2013/09/03 21:56:06 Wouldn't it be a conflict if the library is re-exp
hausner 2013/09/03 22:19:10 That is part of what Gilad has to clarify for us.
}
- if (obj.IsNull() || HidesName(name)) {
+ if (obj.IsNull() || HidesName(name) || obj.IsLibraryPrefix()) {
return Object::null();
}
return obj.raw();
« no previous file with comments | « no previous file | tests/language/prefix24_lib1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698