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 42c2571fa633d7dafee52523887a268e2530fd67..5de194ab8f004f5590dc4a80691daccf292a9bd5 100644 |
--- a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart |
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart |
@@ -178,7 +178,7 @@ class Namer implements ClosureNamer { |
// is generated by string concatenation in applyFunction from |
// js_helper.dart. |
var proposedName = '$base\$$arity'; |
- if (base == closureInvocationSelectorName) return proposedName; |
+ if (name == closureInvocationSelectorName) return proposedName; |
return getMappedInstanceName(proposedName); |
} |
@@ -200,7 +200,9 @@ class Namer implements ClosureNamer { |
// We don't mangle the closure invoking function name because it |
// is generated by string concatenation in applyFunction from |
// js_helper.dart. |
- if (selector.isClosureCall()) return "$name$suffix"; |
+ if (selector.isCall() && name == closureInvocationSelectorName) { |
+ return "$name$suffix"; |
+ } |
String proposedName = privateName(selector.library, name); |
return getMappedInstanceName('$proposedName$suffix'); |
} |