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

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

Issue 895813002: Tweak toString() for better type inference (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:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/dom/templates/html/impl/impl_Location.darttemplate ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/impl/impl_Node.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_Node.darttemplate b/tools/dom/templates/html/impl/impl_Node.darttemplate
index 830714911d3c7cd90aa1f49e69c050f15c38188b..166c34603b2628f9eec8965cb68625f3c97eb82e 100644
--- a/tools/dom/templates/html/impl/impl_Node.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Node.darttemplate
@@ -272,6 +272,9 @@ $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS
/**
* Print out a String representation of this Node.
*/
- String toString() => nodeValue == null ? super.toString() : nodeValue;
+ String toString() {
+ String value = nodeValue; // Fetch DOM Node property once.
+ return value == null ? super.toString() : value;
+ }
$!MEMBERS
}
« no previous file with comments | « tools/dom/templates/html/impl/impl_Location.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698