Index: tools/dom/src/native_DOMImplementation.dart |
diff --git a/tools/dom/src/native_DOMImplementation.dart b/tools/dom/src/native_DOMImplementation.dart |
index 43d542f8fe68b569add11d691992f67016feca1e..7d47bc984d5d7d7508cde9df87040d8b1dfbe0c8 100644 |
--- a/tools/dom/src/native_DOMImplementation.dart |
+++ b/tools/dom/src/native_DOMImplementation.dart |
@@ -302,7 +302,7 @@ class _Utils { |
addForClass(ClassMirror mirror, bool isStatic) { |
if (mirror == null) |
return; |
- addAll(mirror.members, isStatic); |
+ addAll(mirror.declarations, isStatic); |
if (mirror.superclass != null) |
addForClass(mirror.superclass, isStatic); |
for (var interface in mirror.superinterfaces) { |
@@ -423,7 +423,9 @@ class _Utils { |
} |
var className = MirrorSystem.getName(cls.simpleName); |
var createdConstructor = cls.constructors[new Symbol('$className.created')]; |
- if (createdConstructor == null) { |
+ if (createdConstructor == null || |
+ createdConstructor is! MethodMirror || |
+ !createdConstructor.isConstructor) { |
throw new UnsupportedError( |
'Class is missing constructor $className.created'); |
} |