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

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

Issue 11827017: Update remaining usages of Completer.completeException. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 11 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 typedef Object ComputeValue(); 7 typedef Object ComputeValue();
8 8
9 class _MeasurementRequest<T> { 9 class _MeasurementRequest<T> {
10 final ComputeValue computeValue; 10 final ComputeValue computeValue;
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 } 177 }
178 } 178 }
179 179
180 final completedRequests = _pendingRequests; 180 final completedRequests = _pendingRequests;
181 final readyMeasurementFrameCallbacks = _pendingMeasurementFrameCallbacks; 181 final readyMeasurementFrameCallbacks = _pendingMeasurementFrameCallbacks;
182 _pendingRequests = null; 182 _pendingRequests = null;
183 _pendingMeasurementFrameCallbacks = null; 183 _pendingMeasurementFrameCallbacks = null;
184 if (completedRequests != null) { 184 if (completedRequests != null) {
185 for (_MeasurementRequest request in completedRequests) { 185 for (_MeasurementRequest request in completedRequests) {
186 if (request.exception) { 186 if (request.exception) {
187 request.completer.completeException(request.value); 187 request.completer.completeError(request.value);
188 } else { 188 } else {
189 request.completer.complete(request.value); 189 request.completer.complete(request.value);
190 } 190 }
191 } 191 }
192 } 192 }
193 193
194 if (readyMeasurementFrameCallbacks != null) { 194 if (readyMeasurementFrameCallbacks != null) {
195 for (TimeoutHandler handler in readyMeasurementFrameCallbacks) { 195 for (TimeoutHandler handler in readyMeasurementFrameCallbacks) {
196 // TODO(jacobr): wrap each call to a handler in a try-catch block. 196 // TODO(jacobr): wrap each call to a handler in a try-catch block.
197 handler(); 197 handler();
198 } 198 }
199 } 199 }
200 } 200 }
OLDNEW
« no previous file with comments | « tests/standalone/io/file_invalid_arguments_test.dart ('k') | tools/html_json_doc/lib/html_to_json.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698