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

Unified Diff: tests/isolate/mint_maker_test.dart

Issue 10837070: Remove old isolate API and update all code in the repository to use (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/isolate/message_test.dart ('k') | tests/isolate/mixed2_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/isolate/mint_maker_test.dart
diff --git a/tests/isolate/mint_maker_test.dart b/tests/isolate/mint_maker_test.dart
index 1a49e15b157c40f528c0ac5adb4330512577de19..b2cb3ad76e08be922f6cb301bc581389da26d7f1 100644
--- a/tests/isolate/mint_maker_test.dart
+++ b/tests/isolate/mint_maker_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -162,27 +162,22 @@ class PurseWrapper {
// AUTO STATUS UNCLEAR!
-class MintMakerWrapperIsolate extends Isolate {
- MintMakerWrapperIsolate() : super() { }
- void main() {
- this.port.receive((var message, SendPort replyTo) {
- Mint mint = new Mint();
- replyTo.send([ mint.port ], null);
- });
- }
+mintMakerWrapper() {
+ port.receive((var message, SendPort replyTo) {
+ Mint mint = new Mint();
+ replyTo.send([ mint.port ], null);
+ });
}
class MintMakerWrapper {
MintMakerWrapper() {
- port_ = new MintMakerWrapperIsolate().spawn();
+ port_ = spawnFunction(mintMakerWrapper);
}
void makeMint(handleMint(MintWrapper mint)) {
- port_.then((SendPort port) {
- port.call(null).then((var message) {
- SendPort mint = message[0];
- handleMint(new MintWrapper(mint));
- });
+ port_.call(null).then((var message) {
+ SendPort mint = message[0];
+ handleMint(new MintWrapper(mint));
});
}
« no previous file with comments | « tests/isolate/message_test.dart ('k') | tests/isolate/mixed2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698