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

Unified Diff: sky/sdk/lib/framework/fn.dart

Issue 1148253002: [Effen] Try to catch more misuse of fn by asserting that UINode nodes are only built when we're upd… (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 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/sdk/lib/framework/fn.dart
diff --git a/sky/sdk/lib/framework/fn.dart b/sky/sdk/lib/framework/fn.dart
index 9f51a17da881bb1d1bc64ca004f17b18cafe46d3..dc54b76f1c61355e05699162c2d103a3cb1a9436 100644
--- a/sky/sdk/lib/framework/fn.dart
+++ b/sky/sdk/lib/framework/fn.dart
@@ -32,6 +32,7 @@ abstract class UINode {
UINode({ Object key }) {
_key = key == null ? "$runtimeType" : "$runtimeType-$key";
+ assert(this is App || _inRenderDirtyComponents); // you should not build the UI tree ahead of time, build it only during build()
}
// Subclasses which implements Nodes that become stateful may return true
« 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