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

Unified Diff: sdk/lib/_internal/compiler/implementation/lib/js_helper.dart

Issue 12330135: Make instance methods whose names collide with intercepted methods have the interceptor calling con… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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
Index: sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/lib/js_helper.dart (revision 19046)
+++ 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) {
if (!isJsArray(arguments)) arguments = new List.from(arguments);
} else {
arguments = [object]..addAll(arguments);

Powered by Google App Engine
This is Rietveld 408576698