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: tools/dom/src/dartium_CustomElementSupport.dart

Issue 1832713002: Optimize dartium dart:html bindings so real world application performance is acceptable. Improves d… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
Index: tools/dom/src/dartium_CustomElementSupport.dart
diff --git a/tools/dom/src/dartium_CustomElementSupport.dart b/tools/dom/src/dartium_CustomElementSupport.dart
index e769e888882d95f9fd1295fa7bef63373d936144..4bccce15408d0702dbcd5636d48ec9a88ae1bc44 100644
--- a/tools/dom/src/dartium_CustomElementSupport.dart
+++ b/tools/dom/src/dartium_CustomElementSupport.dart
@@ -29,7 +29,6 @@ class _VMElementUpgrader implements ElementUpgrader {
}
Element upgrade(element) {
- var jsObject;
var tag;
var isNativeElementExtension = false;
@@ -43,13 +42,11 @@ class _VMElementUpgrader implements ElementUpgrader {
if (tag != _extendsTag) {
throw new UnsupportedError('$tag is not registered.');
}
- jsObject = unwrap_jso(element);
} else if (element.runtimeType == js.JsObject) {
// It's a Polymer core element (written in JS).
- jsObject = element;
} else if (isNativeElementExtension) {
// Extending a native element.
- jsObject = element.blink_jsObject;
+ // TODO(jacobr): make sure we haven't busted this case.
// Element to extend is the real tag.
tag = element.localName;
@@ -59,10 +56,11 @@ class _VMElementUpgrader implements ElementUpgrader {
throw new UnsupportedError('Element is incorrect type. Got ${element.runtimeType}, expected HtmlElement/JsObject.');
}
- // Remember Dart class to tagName for any upgrading done in wrap_jso.
+ // Remember Dart class to tagName for any upgrading
addCustomElementType(tag, _type, _extendsTag);
- return _createCustomUpgrader(_type, jsObject);
+ // TODO(jacobr): XXX validate that this method still works.
+ return _createCustomUpgrader(_type, element);
}
}

Powered by Google App Engine
This is Rietveld 408576698