Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/lib/js_helper.dart |
| =================================================================== |
| --- sdk/lib/_internal/compiler/implementation/lib/js_helper.dart (revision 19209) |
| +++ sdk/lib/_internal/compiler/implementation/lib/js_helper.dart (working copy) |
| @@ -15,7 +15,8 @@ |
| JS_HAS_EQUALS, |
| RAW_DART_FUNCTION_REF, |
| UNINTERCEPTED; |
| -import 'dart:_interceptors' show getInterceptor; |
| +import 'dart:_interceptors' show getInterceptor, |
| + interceptedNames; |
| part 'constant_map.dart'; |
| part 'native_helper.dart'; |
| @@ -98,13 +99,12 @@ |
| return map; |
| } |
| - static final _objectInterceptor = getInterceptor(new Object()); |
| invokeOn(Object object) { |
| var interceptor = getInterceptor(object); |
| var receiver = object; |
| var name = _internalName; |
| var arguments = _arguments; |
| - if (identical(interceptor, _objectInterceptor)) { |
| + if (JS('int', '#.indexOf(#)', interceptedNames, name) == -1) { |
|
kasperl
2013/03/01 09:06:47
So we emit the interceptedNames as a JS array with
ngeoffray
2013/03/01 10:46:56
As discussed, added a TODO.
|
| if (!isJsArray(arguments)) arguments = new List.from(arguments); |
| } else { |
| arguments = [object]..addAll(arguments); |