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

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

Issue 14251006: Remove AsyncError with Expando. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. 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 | « tools/dom/src/EventStreamProvider.dart ('k') | tools/testing/dart/drt_updater.dart » ('j') | 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 */ 76 */
77 static void propagateModel(Node node, model, bool fullTree) { 77 static void propagateModel(Node node, model, bool fullTree) {
78 // Calling into user code with the != call could generate exceptions. 78 // Calling into user code with the != call could generate exceptions.
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._modelChangedStream != null) { 82 node._modelChangedStream != null) {
83 node._model = model; 83 node._model = model;
84 node._modelChangedStream.add(node); 84 node._modelChangedStream.add(node);
85 } 85 }
86 } on AsyncError catch (e) {
87 e.throwDelayed();
88 } catch (e, s) { 86 } catch (e, s) {
89 new AsyncError(e, s).throwDelayed(); 87 new Future.immediateError(e, s);
90 } 88 }
91 for (var child = node.$dom_firstChild; child != null; 89 for (var child = node.$dom_firstChild; child != null;
92 child = child.nextNode) { 90 child = child.nextNode) {
93 if (child._hasLocalModel != true) { 91 if (child._hasLocalModel != true) {
94 propagateModel(child, model, fullTree); 92 propagateModel(child, model, fullTree);
95 } else if (fullTree) { 93 } else if (fullTree) {
96 propagateModel(child, child._model, true); 94 propagateModel(child, child._model, true);
97 } 95 }
98 } 96 }
99 } 97 }
100 } 98 }
OLDNEW
« no previous file with comments | « tools/dom/src/EventStreamProvider.dart ('k') | tools/testing/dart/drt_updater.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698