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

Unified Diff: sdk/lib/_internal/compiler/js_lib/js_mirrors.dart

Issue 556833004: Check against the correct type when decoding runtime types. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add comparison of result. Created 6 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
« no previous file with comments | « no previous file | tests/lib/mirrors/type_mirror_for_type_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/js_lib/js_mirrors.dart
diff --git a/sdk/lib/_internal/compiler/js_lib/js_mirrors.dart b/sdk/lib/_internal/compiler/js_lib/js_mirrors.dart
index 26882c001666680debf3491f5db4a9dc2db52ee8..4c3bc23f722218cdda09346f28f41d1fa8c0063c 100644
--- a/sdk/lib/_internal/compiler/js_lib/js_mirrors.dart
+++ b/sdk/lib/_internal/compiler/js_lib/js_mirrors.dart
@@ -40,7 +40,8 @@ import 'dart:_js_helper' show
getRuntimeType,
runtimeTypeToString,
setRuntimeTypeInfo,
- throwInvalidReflectionError;
+ throwInvalidReflectionError,
+ TypeImpl;
import 'dart:_interceptors' show
Interceptor,
@@ -2675,7 +2676,7 @@ int findTypeVariableIndex(List<TypeVariableMirror> typeVariables, String name) {
TypeMirror typeMirrorFromRuntimeTypeRepresentation(
DeclarationMirror owner,
- var /*int|List|JsFunction*/ type) {
+ var /*int|List|JsFunction|TypeImpl*/ type) {
// TODO(ahe): This method might benefit from using convertRtiToRuntimeType
// instead of working on strings.
ClassMirror ownerClass;
@@ -2693,7 +2694,7 @@ TypeMirror typeMirrorFromRuntimeTypeRepresentation(
String representation;
if (type == null) {
return JsMirrorSystem._dynamicType;
- } else if (type is Type) {
+ } else if (type is TypeImpl) {
return reflectType(type);
} else if (ownerClass == null) {
representation = runtimeTypeToString(type);
« no previous file with comments | « no previous file | tests/lib/mirrors/type_mirror_for_type_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698