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

Unified Diff: tests/isolate/src/MintMakerTest.dart

Issue 9652001: SendPort + ReceivePort changes: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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/src/MessageTest.dart ('k') | tests/isolate/src/Mixed2Test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/isolate/src/MintMakerTest.dart
diff --git a/tests/isolate/src/MintMakerTest.dart b/tests/isolate/src/MintMakerTest.dart
index f2140027ebf41aa6488623382695ba736b34dc0a..2553422c1843f98729b7de3a21510bc2643637ac 100644
--- a/tests/isolate/src/MintMakerTest.dart
+++ b/tests/isolate/src/MintMakerTest.dart
@@ -49,7 +49,7 @@ class MintWrapper {
MintWrapper(SendPort this.mint_) {}
void createPurse(int balance, handlePurse(PurseWrapper purse)) {
- mint_.call(balance).receive((var message, SendPort replyTo) {
+ mint_.call(balance).then((var message) {
SendPort purse = message[0];
handlePurse(new PurseWrapper(purse));
});
@@ -137,14 +137,14 @@ class PurseWrapper {
PurseWrapper(SendPort this.purse_) {}
void queryBalance(handleBalance(int balance)) {
- purse_.call([ "balance" ]).receive((var message, SendPort replyTo) {
+ purse_.call([ "balance" ]).then((var message) {
int balance = message;
handleBalance(balance);
});
}
void sproutPurse(handleSprouted(PurseWrapper sprouted)) {
- purse_.call([ "sprout" ]).receive((var message, SendPort replyTo) {
+ purse_.call([ "sprout" ]).then((var message) {
SendPort sprouted = message[0];
handleSprouted(new PurseWrapper(sprouted));
});
@@ -179,7 +179,7 @@ class MintMakerWrapper {
void makeMint(handleMint(MintWrapper mint)) {
port_.then((SendPort port) {
- port.call(null).receive((var message, SendPort replyTo) {
+ port.call(null).then((var message) {
SendPort mint = message[0];
handleMint(new MintWrapper(mint));
});
« no previous file with comments | « tests/isolate/src/MessageTest.dart ('k') | tests/isolate/src/Mixed2Test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698