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

Unified Diff: lib/dom/templates/html/dartium/html_dartium.darttemplate

Issue 9732019: dart:html perf optimization based on runing Dromaeo benchmarks (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes Created 8 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: lib/dom/templates/html/dartium/html_dartium.darttemplate
diff --git a/lib/dom/templates/html/dartium/html_dartium.darttemplate b/lib/dom/templates/html/dartium/html_dartium.darttemplate
index f099dd8aef46ed501c5714b3940f344bbd270a90..e1dfa063d2e632ac42b1bee21f3f8b1ef9f5efba 100644
--- a/lib/dom/templates/html/dartium/html_dartium.darttemplate
+++ b/lib/dom/templates/html/dartium/html_dartium.darttemplate
@@ -32,7 +32,7 @@ _DocumentImpl __document;
void _initialize() {
__window = _wrap(dom.window);
- __document = _wrap(dom.document.documentElement);
+ __document = _wrap(dom.document);
}
Window get window() {
@@ -74,13 +74,11 @@ _wrap(raw) {
if (domObject.dartObjectLocalStorage != null)
return domObject.dartObjectLocalStorage;
switch(domObject.typeName) {
- case 'HTMLDocument':
- throw 'A document should never be wrapped directly. TODO(jacobr) XXX';
- case 'HTMLHtmlElement':
- return new _DocumentImpl._wrap(domObject);
case 'HTMLElement':
return new _UnknownElementImpl._wrap(domObject);
$WRAPCASES
+ case 'HTMLDocument':
+ return new _DocumentImpl._wrap(domObject);
default:
throw 'Unrecognized object $domObject. Name=${domObject.typeName}';
}

Powered by Google App Engine
This is Rietveld 408576698