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

Unified Diff: tools/dom/templates/html/impl/impl_Document.darttemplate

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: update cached patches 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/templates/html/impl/impl_Document.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_Document.darttemplate b/tools/dom/templates/html/impl/impl_Document.darttemplate
index ca0705a37b5670f41eb739068aa7f5af20b8ec81..9dae6c78d4e79daaaa71f84043ba74c3b9b5a0a5 100644
--- a/tools/dom/templates/html/impl/impl_Document.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Document.darttemplate
@@ -68,23 +68,9 @@ $if DART2JS
? _createElement_2(tagName)
: _createElement(tagName, typeExtension);
$else
- var newElement = (typeExtension == null) ?
- _blink.BlinkDocument.instance.createElement_Callback_1_(unwrap_jso(this), tagName) :
- _blink.BlinkDocument.instance.createElement_Callback_2_(unwrap_jso(this), tagName, typeExtension);
-
- var wrapped = js.getDartHtmlWrapperFor(newElement); // Here's our Dart class.
- if (wrapped != null) {
- wrapped.blink_jsObject = newElement;
- } else {
- wrapped = wrap_jso(newElement);
- if (wrapped == null) {
- wrapped = wrap_jso_custom_element(newElement);
- } else {
- js.setDartHtmlWrapperFor(wrapped.blink_jsObject, wrapped);
- }
- }
-
- return wrapped;
+ return (typeExtension == null) ?
+ _blink.BlinkDocument.instance.createElement_Callback_1_(this, tagName) :
+ _blink.BlinkDocument.instance.createElement_Callback_2_(this, tagName, typeExtension);
$endif
}
@@ -110,25 +96,9 @@ $if DART2JS
? _createElementNS_2(namespaceURI, qualifiedName)
: _createElementNS(namespaceURI, qualifiedName, typeExtension);
$else
- var newElement = (typeExtension == null) ?
- _blink.BlinkDocument.instance.createElementNS_Callback_2_(unwrap_jso(this), namespaceURI, qualifiedName) :
- _blink.BlinkDocument.instance.createElementNS_Callback_3_(unwrap_jso(this), namespaceURI, qualifiedName, typeExtension);
-
- var wrapped;
-
- wrapped = js.getDartHtmlWrapperFor(newElement); // Here's our Dart class.
- if (wrapped != null) {
- wrapped.blink_jsObject = newElement;
- } else {
- wrapped = wrap_jso(newElement);
- if (wrapped == null) {
- wrapped = wrap_jso_custom_element(newElement);
- } else {
- js.setDartHtmlWrapperFor(wrapped.blink_jsObject, wrapped); // Here's our Dart class.
- }
- }
-
- return wrapped;
+ return (typeExtension == null) ?
+ _blink.BlinkDocument.instance.createElementNS_Callback_2_(this, namespaceURI, qualifiedName) :
+ _blink.BlinkDocument.instance.createElementNS_Callback_3_(this, namespaceURI, qualifiedName, typeExtension);
$endif
}

Powered by Google App Engine
This is Rietveld 408576698