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

Unified Diff: corelib/src/implementation/future_implementation.dart

Issue 9155017: Handle defered handling of exceptions (where the exception is thrown before the (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: quick typo fix Created 8 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 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: corelib/src/implementation/future_implementation.dart
diff --git a/corelib/src/implementation/future_implementation.dart b/corelib/src/implementation/future_implementation.dart
index 47c1e5d8c07ac628f806556c1f7e1b1e0de3fc1c..6f098148a010d9fc317995e29f5bfdef0f921246 100644
--- a/corelib/src/implementation/future_implementation.dart
+++ b/corelib/src/implementation/future_implementation.dart
@@ -91,7 +91,13 @@ class FutureImpl<T> implements Future<T> {
}
void handleException(void onException(Object exception)) {
- _exceptionHandlers.add(onException);
+ if (null !== _exception) {
Siggi Cherem (dart-lang) 2012/01/21 01:50:38 (swap): _expression !== null
+ if (!_exceptionHandled) {
+ _exceptionHandled = onException(exception);
+ }
+ } else {
+ _exceptionHandlers.add(onException);
+ }
}
void _complete() {
« 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