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

Unified Diff: tools/dom/src/native_DOMImplementation.dart

Issue 29033003: Fixing custom element type extensions in Dartium to have correct native type ID (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | « tools/dom/scripts/systemnative.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/src/native_DOMImplementation.dart
diff --git a/tools/dom/src/native_DOMImplementation.dart b/tools/dom/src/native_DOMImplementation.dart
index 037f4cd8807c3ce86b3273a2bf90a6892287b16b..cbea9eda1b4dc69f198b662d1de38e16057cb770 100644
--- a/tools/dom/src/native_DOMImplementation.dart
+++ b/tools/dom/src/native_DOMImplementation.dart
@@ -104,9 +104,12 @@ class _Utils {
return false;
}
- static bool isTypeSubclassOfTag(Type type, String tagName) {
+ static Element getAndValidateNativeType(Type type, String tagName) {
var element = new Element.tag(tagName);
- return isTypeSubclassOf(type, element.runtimeType);
+ if (!isTypeSubclassOf(type, element.runtimeType)) {
+ return null;
+ }
+ return element;
}
static window() native "Utils_window";
« no previous file with comments | « tools/dom/scripts/systemnative.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698