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

Unified Diff: samples/dartcombat/setup.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 | « samples/dartcombat/player.dart ('k') | samples/dartcombat/state.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/dartcombat/setup.dart
diff --git a/samples/dartcombat/setup.dart b/samples/dartcombat/setup.dart
index 7c3d82ceb99b51ed95fd3462169447b15c5e8e61..406c01b035dced7ca85b961eebb2312b487b85ce 100644
--- a/samples/dartcombat/setup.dart
+++ b/samples/dartcombat/setup.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.
@@ -40,13 +40,9 @@ void createPlayers() {
Player player2 = new Player();
player2.setup(window, 2);
- player2.portToPlayer.then((SendPort port) {
- player1.enemy = new FlakyProxy(port).sendPort;
- });
+ player1.enemy = new FlakyProxy(player2.portToPlayer).sendPort;
- player1.portToPlayer.then((SendPort port) {
- player2.enemy = new FlakyProxy(port).sendPort;
- });
+ player2.enemy = new FlakyProxy(player1.portToPlayer).sendPort;
}
/**
@@ -63,8 +59,8 @@ void createPlayersForTest(SendPort testPort) {
player1.setup(window, 1);
player2.setup(window, 2);
- player2.portToPlayer.then((SendPort port) { player1.enemy = port; });
- player1.portToPlayer.then((SendPort port) { player2.enemy = port; });
+ player1.enemy = player2.portToPlayer;
+ player2.enemy = player1.portToPlayer;
}
/**
« no previous file with comments | « samples/dartcombat/player.dart ('k') | samples/dartcombat/state.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698