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

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

Issue 23493026: Revert "Fix casts and type assertions on mixins used in native classes." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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/js_backend/native_emitter.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart b/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart
index 13cc42b9cab04eb484b4db8e810383084580cb5f..c5ccf96c8863fd632c0815648eef71cf74425733 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart
@@ -464,21 +464,19 @@ class NativeEmitter {
return false;
}
- if (backend.classesMixedIntoNativeClasses.contains(element)) return true;
-
return subtypes[element] != null;
}
bool requiresNativeIsCheck(Element element) {
// TODO(sra): Remove this function. It determines if a native type may
- // satisfy a check against [element], in which case an interceptor must be
+ // satisfy a check against [element], in whcih case an interceptor must be
// used. We should also use an interceptor if the check can't be satisfied
- // by a native class in case we get a native instance that tries to spoof
+ // by a native class in case we get a natibe instance that tries to spoof
// the type info. i.e the criteria for whether or not to use an interceptor
// is whether the receiver can be native, not the type of the test.
if (!element.isClass()) return false;
ClassElement cls = element;
- if (Elements.isNativeOrExtendsNative(cls)) return true;
+ if (cls.isNative()) return true;
return isSupertypeOfNativeClass(element);
}

Powered by Google App Engine
This is Rietveld 408576698