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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/namer.dart

Issue 425023002: Ensure that unmangled private names are unique. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 | sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
index 96115b9f5000badae26eaf90bc0ac5abf228ee05..8b92b756720a1b89c29b7c2e86c903691db2abdd 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
@@ -359,11 +359,10 @@ class Namer implements ClosureNamer {
if (!isPrivateName(name)) return nameString;
// The first library asking for a short private name wins.
- LibraryElement owner = shouldMinify
- ? library
- : shortPrivateNameOwners.putIfAbsent(nameString, () => library);
+ LibraryElement owner =
+ shortPrivateNameOwners.putIfAbsent(nameString, () => library);
- if (owner == library && !shouldMinify && !nameString.contains('\$')) {
+ if (owner == library && !nameString.contains('\$')) {
// Since the name doesn't contain $ it doesn't clash with any
// of the private names that have the library name as the prefix.
return nameString;
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698