Index: pkg/compiler/lib/src/js_emitter/class_stub_generator.dart |
diff --git a/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart b/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart |
index 54b2a1bcdc5c61eabf8df93d5d52bdd7282e47aa..e21ba1daf0bd280ce3c6192fe7e634dee5d0c232 100644 |
--- a/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart |
+++ b/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart |
@@ -158,16 +158,14 @@ class ClassStubGenerator { |
String internalName = namer.invocationMirrorInternalName(selector); |
assert(backend.isInterceptedName(Compiler.NO_SUCH_METHOD)); |
- bool isIntercepted = backend.isInterceptedName(selector.name); |
jsAst.Expression expression = |
- js('''this.#noSuchMethodName(#receiver, |
+ js('''this.#noSuchMethodName(this, |
#createInvocationMirror(#methodName, |
#internalName, |
#type, |
#arguments, |
#namedArguments))''', |
- {'receiver': isIntercepted ? r'$receiver' : 'this', |
- 'noSuchMethodName': namer.noSuchMethodName, |
+ {'noSuchMethodName': namer.noSuchMethodName, |
'createInvocationMirror': |
backend.emitter.staticFunctionAccess( |
backend.getCreateInvocationMirror()), |
@@ -181,7 +179,7 @@ class ClassStubGenerator { |
'namedArguments': new jsAst.ArrayInitializer(argNames)}); |
jsAst.Expression function; |
- if (isIntercepted) { |
+ if (backend.isInterceptedName(selector.name)) { |
function = js(r'function($receiver, #) { return # }', |
[parameterNames, expression]); |
} else { |