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

Unified Diff: tests/isolate/stacktrace_message_test.dart

Issue 27215002: Very simple version of Isolates. (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 | « tests/isolate/spawn_uri_vm_test.dart ('k') | tests/isolate/stream_mangling_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/isolate/stacktrace_message_test.dart
diff --git a/tests/isolate/stacktrace_message_test.dart b/tests/isolate/stacktrace_message_test.dart
index e0e05eccdbb72ad54e01a8dfabe7c78fb0f04c20..56ec95f17a0fbe625f2e6ff9205ec5f08adc93cb 100644
--- a/tests/isolate/stacktrace_message_test.dart
+++ b/tests/isolate/stacktrace_message_test.dart
@@ -5,21 +5,23 @@
import 'dart:isolate';
main() {
- spawnFunction(runTest).call(null);
+ ReceivePort reply = new ReceivePort();
+ Isolate.spawn(runTest, reply.sendPort);
+ reply.first.then((StackTrace stack) {
+ print(stack);
+ });
}
-runTest() {
- port.receive((param, sendport) {
+runTest(SendPort sendport) {
+ try {
+ throw 'sorry';
+ } catch (e, stack) {
try {
- throw 'sorry';
- } catch (e, stack) {
- try {
- sendport.send(stack);
- print("Stacktrace sent");
- } catch (e) {
- print("Stacktrace not sent");
- sendport.send(null);
- }
+ sendport.send(stack);
+ print("Stacktrace sent");
+ } catch (e) {
+ print("Stacktrace not sent");
+ sendport.send(null);
}
- });
+ }
}
« no previous file with comments | « tests/isolate/spawn_uri_vm_test.dart ('k') | tests/isolate/stream_mangling_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698