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

Unified Diff: pkg/smoke/lib/mirrors.dart

Issue 213713002: Reapply change that makes path-observer more agressive with property lookups. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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
« no previous file with comments | « pkg/polymer_expressions/lib/eval.dart ('k') | pkg/smoke/test/common.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/smoke/lib/mirrors.dart
diff --git a/pkg/smoke/lib/mirrors.dart b/pkg/smoke/lib/mirrors.dart
index d30baa2ef90df4df998d6cbf1fedc2faf314a9aa..c49c536adcffe6dd6bb2ce6ee66739088261aced 100644
--- a/pkg/smoke/lib/mirrors.dart
+++ b/pkg/smoke/lib/mirrors.dart
@@ -218,7 +218,18 @@ Symbol _setterName(Symbol getter) =>
ClassMirror _safeSuperclass(ClassMirror type) {
try {
- return type.superclass;
+ var t = type.superclass;
+ // TODO(sigmund): workaround for darbug.com/17779.
+ // Interceptor is leaked by dart2js. It has the same methods as Object
+ // (including noSuchMethod), and our code above assumes that it doesn't
+ // exist. Most queries exclude Object, so they should exclude Interceptor
+ // too. We don't check for t.simpleName == #Interceptor because depending on
+ // dart2js optimizations it may be #Interceptor or #num/Interceptor.
+ // Checking for a private library seems to reliably filter this out.
+ if (t != null && t.owner != null && t.owner.isPrivate) {
+ t = _objectType;
+ }
+ return t;
} on UnsupportedError catch (e) {
// Note: dart2js throws UnsupportedError when the type is not reflectable.
return _objectType;
« no previous file with comments | « pkg/polymer_expressions/lib/eval.dart ('k') | pkg/smoke/test/common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698