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

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

Issue 2509413002: An isolate created with spawn function doesn't necessarily agree with its parent on the library pri… (Closed)
Patch Set: Created 4 years, 1 month 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/snapshot.cc ('k') | no next file » | 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) 2016, 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 import "dart:isolate";
6 import "dart:async";
siva 2016/11/22 06:18:21 why is dart:async needed here?
rmacnak 2016/11/23 23:35:53 Removed
7 import "package:expect/expect.dart";
8
9 class _Private {
10 String data;
11 _Private(this.data);
12 }
13
14 void child(message) {
15 print("Got message: $message");
16 SendPort replyPort = message[0];
17 _Private object = message[1];
18 Expect.isTrue(object is _Private);
19 Expect.equals("XYZ", object.data);
20 replyPort.send(object);
21 }
22
23 void main() {
24 var port;
25 port = new RawReceivePort((message) {
26 print("Got reply: $message");
27 Expect.isTrue(message is _Private);
28 Expect.equals("XYZ", message.data);
29 port.close();
30 });
31
32 Isolate.spawn(child, [port.sendPort, new _Private("XYZ")]);
33 }
siva 2016/11/22 06:18:21 You would have to skip this test in the status fil
rmacnak 2016/11/23 23:35:53 Done.
OLDNEW
« no previous file with comments | « runtime/vm/snapshot.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698