Update Stream.listen doc and use ?? in some places.

R=floitsch@google.com

Review URL: https://codereview.chromium.org/1606543005 .
This commit is contained in:
Lasse R.H. Nielsen 2016-01-21 12:58:24 +01:00
parent d6a8a2aa88
commit 3990be61d9
4 changed files with 26 additions and 30 deletions

View file

@ -1,3 +1,9 @@
## 1.15.0
### Core library changes
* Addad `Uri.queryParametersAll` to handle multiple query parameters with
the same name.
## 1.14.0
### Core library changes
@ -12,8 +18,6 @@
* Added `current` getter to `StackTrace` class.
* Added `Uri.data` getter for `data:` URIs, and `UriData` class for the
return type.
* Addad `Uri.queryParametersAll` to handle multiple query parameters with
the same name.
* Added `growable` parameter to `List.filled` constructor.
* Added microsecond support to `DateTime`: `DateTime.microsecond`,
`DateTime.microsecondsSinceEpoch`, and

View file

@ -225,7 +225,7 @@ abstract class Future<T> {
_Future result = new _Future<T>();
new Timer(duration, () {
try {
result._complete(computation == null ? null : computation());
result._complete(computation?.call());
} catch (e, s) {
_completeWithErrorCallback(result, e, s);
}

View file

@ -325,6 +325,10 @@ abstract class Stream<T> {
* two arguments it is called with the stack trace (which could be `null` if
* the stream itself received an error without stack trace).
* Otherwise it is called with just the error object.
* If [onError] is omitted, any errors on the stream are considered unhandled,
* and will be passed to the current [Zone]'s error handler.
* By default unhandled async errors are treated
* as if they were uncaught top-level errors.
*
* If this stream closes, the [onDone] handler is called.
*

View file

@ -135,33 +135,21 @@ abstract class ZoneSpecification {
Map zoneValues): null
}) {
return new ZoneSpecification(
handleUncaughtError: handleUncaughtError != null
? handleUncaughtError
: other.handleUncaughtError,
run: run != null ? run : other.run,
runUnary: runUnary != null ? runUnary : other.runUnary,
runBinary: runBinary != null ? runBinary : other.runBinary,
registerCallback: registerCallback != null
? registerCallback
: other.registerCallback,
registerUnaryCallback: registerUnaryCallback != null
? registerUnaryCallback
: other.registerUnaryCallback,
registerBinaryCallback: registerBinaryCallback != null
? registerBinaryCallback
: other.registerBinaryCallback,
errorCallback: errorCallback != null
? errorCallback
: other.errorCallback,
scheduleMicrotask: scheduleMicrotask != null
? scheduleMicrotask
: other.scheduleMicrotask,
createTimer : createTimer != null ? createTimer : other.createTimer,
createPeriodicTimer: createPeriodicTimer != null
? createPeriodicTimer
: other.createPeriodicTimer,
print : print != null ? print : other.print,
fork: fork != null ? fork : other.fork);
handleUncaughtError: handleUncaughtError ?? other.handleUncaughtError,
run: run ?? other.run,
runUnary: runUnary ?? other.runUnary,
runBinary: runBinary ?? other.runBinary,
registerCallback: registerCallback ?? other.registerCallback,
registerUnaryCallback: registerUnaryCallback ??
other.registerUnaryCallback,
registerBinaryCallback: registerBinaryCallback ??
other.registerBinaryCallback,
errorCallback: errorCallback ?? other.errorCallback,
scheduleMicrotask: scheduleMicrotask ?? other.scheduleMicrotask,
createTimer : createTimer ?? other.createTimer,
createPeriodicTimer: createPeriodicTimer ?? other.createPeriodicTimer,
print : print ?? other.print,
fork: fork ?? other.fork);
}
HandleUncaughtErrorHandler get handleUncaughtError;