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

Unified Diff: runtime/lib/isolate_patch.dart

Issue 43663003: dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 7 years, 2 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 | sdk/lib/_internal/lib/isolate_helper.dart » ('j') | sdk/lib/_internal/lib/isolate_helper.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/isolate_patch.dart
diff --git a/runtime/lib/isolate_patch.dart b/runtime/lib/isolate_patch.dart
index e82050fd0f075ee78be4174fe825de062b264d62..88312681963135c57b400bb62b60e6c3e6bc1fec 100644
--- a/runtime/lib/isolate_patch.dart
+++ b/runtime/lib/isolate_patch.dart
@@ -40,7 +40,10 @@ class _ReceivePortImpl extends Stream implements ReceivePort {
{ Function onError,
void onDone(),
bool cancelOnError }) {
- return _controller.stream.listen(onData);
+ return _controller.stream.listen(onData,
+ onError: onError,
+ onDone: onDone,
+ cancelOnError: cancelOnError);
}
close() {
@@ -209,6 +212,15 @@ patch class Isolate {
Uri uri, List<String> args, var message) {
Completer completer = new Completer<Isolate>.sync();
try {
+ if (args is List<String>) {
+ for (int i = 0; i < args.length; i++) {
+ if (args[i] is! String) {
+ throw new ArgumentError("Args must be a list of Strings $args");
+ }
+ }
+ } else if (args != null) {
+ throw new ArgumentError("Args must be a list of Strings $args");
Lasse Reichstein Nielsen 2013/10/25 14:28:24 If we allow null, will it be null at the other end
floitsch 2013/10/25 14:33:14 I would say `null`.
+ }
// The VM will invoke [_startIsolate] and not `main`.
SendPort controlPort = _spawnUri(uri.path);
RawReceivePort readyPort = new RawReceivePort();
« no previous file with comments | « no previous file | sdk/lib/_internal/lib/isolate_helper.dart » ('j') | sdk/lib/_internal/lib/isolate_helper.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698