Chromium Code Reviews| Index: sdk/lib/async/future_impl.dart |
| diff --git a/sdk/lib/async/future_impl.dart b/sdk/lib/async/future_impl.dart |
| index be0b7a23229fff9d0acee3ff592698f11332e542..1e644d581250eb4267e2e626b7806b5ed7d11bf8 100644 |
| --- a/sdk/lib/async/future_impl.dart |
| +++ b/sdk/lib/async/future_impl.dart |
| @@ -23,8 +23,8 @@ abstract class _Completer<T> implements Completer<T> { |
| if (_isComplete) throw new StateError("Future already completed"); |
| _isComplete = true; |
| _FutureImpl futureImpl = future; |
| - futureImpl._zone.cancelCallbackExpectation(); |
| _setFutureValue(value); |
| + futureImpl._zone.cancelCallbackExpectation(); |
| } |
| void completeError(Object error, [Object stackTrace = null]) { |
| @@ -35,12 +35,8 @@ abstract class _Completer<T> implements Completer<T> { |
| _attachStackTrace(error, stackTrace); |
| } |
| _FutureImpl futureImpl = future; |
| - if (futureImpl._inSameErrorZone(_Zone.current)) { |
| - futureImpl._zone.cancelCallbackExpectation(); |
| - _setFutureError(error); |
| - } else { |
| - _Zone.current.handleUncaughtError(error); |
| - } |
| + _setFutureError(error); |
| + futureImpl._zone.cancelCallbackExpectation(); |
|
Lasse Reichstein Nielsen
2013/07/05 19:00:07
Is this too early if _setFutureError is async? We
floitsch
2013/07/08 10:45:51
Moved it down to _setFutureValue and _setFutureErr
|
| } |
| bool get isCompleted => _isComplete; |