Chromium Code Reviews
DescriptionMake _Future._chainForeignFuture not cause an assert.
If the foreign future completes with a future, the following call to
_Future._completeWithValue would hit an assert in checked mode
(value is! Future). This change makes the _Future._completeWithValue flatten
incoming nesting futures before completing the _Future, ensuring that a
_Future never has a Future as value.
An alternative is to throw if the value of a future is another future.
That's what the assert does in checked mode, but we shouldn't be able to hit
an assert.
R=floitsch@google.com
Committed: https://github.com/dart-lang/sdk/commit/63b71b4c241e8dbfa62fbb10aec71afe8e592694
Patch Set 1 #
Total comments: 6
Patch Set 2 : Address comments #
Messages
Total messages: 6 (2 generated)
|
||||||||||||||||||||||||||||