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

Unified Diff: sky/framework/fn.dart

Issue 1021113002: [Effen] Add _syncChild assert and cleanup trace output (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/fn.dart
diff --git a/sky/framework/fn.dart b/sky/framework/fn.dart
index 1787e89ccb4799ebc960c6bfb3db304766c447ed..5262227dd2f13be108cb997513cc0530880e0ea6 100644
--- a/sky/framework/fn.dart
+++ b/sky/framework/fn.dart
@@ -122,6 +122,8 @@ abstract class Node {
Node _syncChild(Node node, Node oldNode, sky.ParentNode host,
sky.Node insertBefore) {
+ assert(oldNode == null || node._key == oldNode._key);
+
if (node == oldNode) {
_trace('_sync(identical) ${node._key}');
return node; // Nothing to do. Subtrees must be identical.
@@ -136,7 +138,7 @@ abstract class Node {
}
if (node._willSync(oldNode)) {
- _trace('_sync(statefull) ${node._key} -> ${oldNode._key}');
+ _trace('_sync(statefull) ${node._key}');
oldNode._sync(node, host, insertBefore);
node._defunct = true;
assert(oldNode._root is sky.Node);
@@ -148,7 +150,7 @@ abstract class Node {
if (oldNode == null) {
_trace('_sync(insert) ${node._key}');
} else {
- _trace('_sync(stateless) ${node._key} <- ${oldNode._key}');
+ _trace('_sync(stateless) ${node._key}');
}
node._sync(oldNode, host, insertBefore);
if (oldNode != null)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698