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

Side by Side Diff: tests/isolate/error_at_spawn_test.dart

Issue 1244733002: - Implement VM parts of https://codereview.chromium.org/1240743003/ (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update isolate.status file as expected. Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/isolate.cc ('k') | tests/isolate/error_at_spawnuri_iso.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 library error_at_spawn;
6
7 import "dart:isolate";
8 import "dart:async";
9 import "package:async_helper/async_helper.dart";
10 import "package:expect/expect.dart";
11
12 isomain(args) {
13 throw new ArgumentError("fast error");
14 }
15
16 main(){
17 asyncStart();
18
19 // Capture errors from other isolate as raw messages.
20 RawReceivePort errorPort = new RawReceivePort();
21 errorPort.handler = (message) {
22 String error = message[0];
23 String stack = message[1];
24 Expect.equals(new ArgumentError("fast error").toString(), "$error");
25 errorPort.close();
26 asyncEnd();
27 };
28
29 Isolate.spawn(isomain,
30 null,
31 // Setup handler as part of spawn.
32 errorsAreFatal: false,
33 onError: errorPort.sendPort);
34 }
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | tests/isolate/error_at_spawnuri_iso.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698