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

Side by Side Diff: tools/dom/src/ModelTreeObserver.dart

Issue 14103018: Fix Future.immediateError users. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | 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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of html; 5 part of html;
6 6
7 class _ModelTreeObserver { 7 class _ModelTreeObserver {
8 static bool _initialized = false; 8 static bool _initialized = false;
9 9
10 /** 10 /**
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // Catch and report them a global exceptions. 79 // Catch and report them a global exceptions.
80 try { 80 try {
81 if (node._hasLocalModel != true && node._model != model && 81 if (node._hasLocalModel != true && node._model != model &&
82 node._modelChangedStreams != null && 82 node._modelChangedStreams != null &&
83 !node._modelChangedStreams.isEmpty) { 83 !node._modelChangedStreams.isEmpty) {
84 node._model = model; 84 node._model = model;
85 node._modelChangedStreams.toList() 85 node._modelChangedStreams.toList()
86 .forEach((controller) => controller.add(node)); 86 .forEach((controller) => controller.add(node));
87 } 87 }
88 } catch (e, s) { 88 } catch (e, s) {
89 new Future.immediateError(e, s); 89 new Future.error(e, s);
90 } 90 }
91 for (var child = node.$dom_firstChild; child != null; 91 for (var child = node.$dom_firstChild; child != null;
92 child = child.nextNode) { 92 child = child.nextNode) {
93 if (child._hasLocalModel != true) { 93 if (child._hasLocalModel != true) {
94 propagateModel(child, model, fullTree); 94 propagateModel(child, model, fullTree);
95 } else if (fullTree) { 95 } else if (fullTree) {
96 propagateModel(child, child._model, true); 96 propagateModel(child, child._model, true);
97 } 97 }
98 } 98 }
99 } 99 }
100 } 100 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698