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

Unified Diff: samples/dartcombat/player.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: Fix namespace comment. 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
Index: samples/dartcombat/player.dart
diff --git a/samples/dartcombat/player.dart b/samples/dartcombat/player.dart
index 6649f55afa4f6e9588e3020a7512526a5c5caf7c..a46c60b18814f22d4758e214b891ee18cb2561e7 100644
--- a/samples/dartcombat/player.dart
+++ b/samples/dartcombat/player.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.
@@ -33,26 +33,26 @@ interface Enemy default EnemyImpl {
* contains the actual player state.
*/
class PlayerImpl implements Player {
- final Future<SendPort> portToPlayer;
Siggi Cherem (dart-lang) 2012/08/02 16:43:35 another note - we tried to make spawnFunction retu
Mads Ager (google) 2012/08/03 05:51:35 Thanks for filing that bug Siggi. Based on your co
+ final SendPort portToPlayer;
- PlayerImpl() : portToPlayer = new PlayerState().spawn();
+ PlayerImpl() : portToPlayer = spawnFunction(spawnPlayer);
Siggi Cherem (dart-lang) 2012/08/02 16:43:35 FYI - this will break once dart2js bug is fixed, t
Mads Ager (google) 2012/08/03 05:51:35 Thanks Siggi! I'll add a comment that the players
void setup(Window window, int player) {
- portToPlayer.then((SendPort port) => port.call(
+ portToPlayer.call(
{ "action" : MessageIds.SETUP,
- "args" : [player] }));
+ "args" : [player] });
}
void set enemy(SendPort portToEnemy) {
- portToPlayer.then((port) => port.call(
+ portToPlayer.call(
{ "action" : MessageIds.SET_ENEMY,
- "args" : [portToEnemy]}));
+ "args" : [portToEnemy]});
}
void set _portForTest(SendPort testPort) {
- portToPlayer.then((port) => port.call(
+ portToPlayer.call(
{ "action" : MessageIds.SET_PORT_FOR_TEST,
- "args" : [testPort]}));
+ "args" : [testPort]});
}
}

Powered by Google App Engine
This is Rietveld 408576698