Index: lib/runtime/dart/_isolate_helper.js |
diff --git a/lib/runtime/dart/_isolate_helper.js b/lib/runtime/dart/_isolate_helper.js |
index 5606797fd67382611b5d17a8df8eec444f770444..2dea3969717a9f9c5703b62971bdb3309effbd2d 100644 |
--- a/lib/runtime/dart/_isolate_helper.js |
+++ b/lib/runtime/dart/_isolate_helper.js |
@@ -34,8 +34,7 @@ dart_library.library('dart/_isolate_helper', null, /* Imports */[ |
const _id = Symbol('_id'); |
const _receivePort = Symbol('_receivePort'); |
class _Serializer extends core.Object { |
- _Serializer(opts) { |
- let serializeSendPorts = opts && 'serializeSendPorts' in opts ? opts.serializeSendPorts : true; |
+ _Serializer({serializeSendPorts = true} = {}) { |
this.serializedObjectIds = core.Map$(dart.dynamic, core.int).identity(); |
this[_serializeSendPorts] = dart.as(serializeSendPorts, core.bool); |
} |
@@ -191,8 +190,7 @@ dart_library.library('dart/_isolate_helper', null, /* Imports */[ |
}); |
const _adjustSendPorts = Symbol('_adjustSendPorts'); |
class _Deserializer extends core.Object { |
- _Deserializer(opts) { |
- let adjustSendPorts = opts && 'adjustSendPorts' in opts ? opts.adjustSendPorts : true; |
+ _Deserializer({adjustSendPorts = true} = {}) { |
this.deserializedObjects = core.List.new(); |
this[_adjustSendPorts] = dart.as(adjustSendPorts, core.bool); |
} |
@@ -1412,10 +1410,7 @@ dart_library.library('dart/_isolate_helper', null, /* Imports */[ |
this[_controller] = async.StreamController.new({onCancel: dart.bind(this, 'close'), sync: true}); |
this[_rawPort].handler = dart.bind(this[_controller], 'add'); |
} |
- listen(onData, opts) { |
- let onError = opts && 'onError' in opts ? opts.onError : null; |
- let onDone = opts && 'onDone' in opts ? opts.onDone : null; |
- let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null; |
+ listen(onData, {onError = null, onDone = null, cancelOnError = null} = {}) { |
return this[_controller].stream.listen(onData, {onError: onError, onDone: onDone, cancelOnError: cancelOnError}); |
} |
close() { |