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

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Issue 943043005: Do not allow abstract classes to be registered as custom elements (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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:
Download patch
« no previous file with comments | « no previous file | tools/dom/src/dartium_CustomElementSupport.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 63d97d759439caaf60b4ab5ea118f0a98b1532a4..bf43c15d97f9b22796609ac317dec4c268a9b7f5 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -40487,6 +40487,11 @@ ClassMirror _validateCustomType(Type type) {
}
var className = MirrorSystem.getName(cls.simpleName);
+ if (cls.isAbstract) {
+ throw new UnsupportedError('Invalid custom element '
+ 'class $className is abstract.');
+ }
+
var createdConstructor = cls.declarations[new Symbol('$className.created')];
if (createdConstructor == null ||
createdConstructor is! MethodMirror ||
« no previous file with comments | « no previous file | tools/dom/src/dartium_CustomElementSupport.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698