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

Side by Side Diff: sky/sdk/lib/framework/fn.dart

Issue 1149533002: [Effen] add an assert that you don't try to re-add a defunct node (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 library fn; 5 library fn;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:sky' as sky; 9 import 'dart:sky' as sky;
10 import 'reflect.dart' as reflect; 10 import 'reflect.dart' as reflect;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 } 102 }
103 103
104 if (node._willSync(oldNode)) { 104 if (node._willSync(oldNode)) {
105 _traceSync(_SyncOperation.STATEFUL, node._key); 105 _traceSync(_SyncOperation.STATEFUL, node._key);
106 oldNode._sync(node, host, insertBefore); 106 oldNode._sync(node, host, insertBefore);
107 node._defunct = true; 107 node._defunct = true;
108 assert(oldNode._root is RenderCSS); 108 assert(oldNode._root is RenderCSS);
109 return oldNode; 109 return oldNode;
110 } 110 }
111 111
112 assert(!node._defunct);
112 node._parent = this; 113 node._parent = this;
113 114
114 if (oldNode == null) { 115 if (oldNode == null) {
115 _traceSync(_SyncOperation.INSERTION, node._key); 116 _traceSync(_SyncOperation.INSERTION, node._key);
116 } else { 117 } else {
117 _traceSync(_SyncOperation.STATELESS, node._key); 118 _traceSync(_SyncOperation.STATELESS, node._key);
118 } 119 }
119 node._sync(oldNode, host, insertBefore); 120 node._sync(oldNode, host, insertBefore);
120 if (oldNode != null) 121 if (oldNode != null)
121 oldNode._defunct = true; 122 oldNode._defunct = true;
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 _sync(null, _host, _root); 922 _sync(null, _host, _root);
922 } 923 }
923 } 924 }
924 925
925 class Text extends Component { 926 class Text extends Component {
926 Text(this.data) : super(key: '*text*'); 927 Text(this.data) : super(key: '*text*');
927 final String data; 928 final String data;
928 bool get interchangeable => true; 929 bool get interchangeable => true;
929 UINode build() => new Paragraph(children: [new TextFragment(data)]); 930 UINode build() => new Paragraph(children: [new TextFragment(data)]);
930 } 931 }
OLDNEW
« 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