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

Unified Diff: samples/isolate_html/isolate_sample.dart

Issue 12218131: Combine window.setTimeout/setInterval with Timer and Timer.repeating. Also (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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/setup.dart ('k') | samples/swarm/App.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/isolate_html/isolate_sample.dart
diff --git a/samples/isolate_html/isolate_sample.dart b/samples/isolate_html/isolate_sample.dart
index f3a9079ecf11a2dc44f7a8baa21bd35d42d19f8a..4f239a8811329435a40c7afd7fbf8ffdb846e733 100644
--- a/samples/isolate_html/isolate_sample.dart
+++ b/samples/isolate_html/isolate_sample.dart
@@ -75,11 +75,9 @@ void isolateMain() {
if (div.query('input.replyCheckbox').checked) {
InputElement element = div.query('.delayTextbox');
int millis = int.parse(element.value);
- // TODO(justinfagnani): use Timer when it works in isolates in dart2js
- // see: http://dartbug.com/4997
- window.setTimeout(() {
+ new Timer(new Duration(milliseconds: millis), () {
replyTo.send('this is a reply from isolate "${isolateName}"', null);
- }, millis);
+ });
}
}
« no previous file with comments | « samples/dartcombat/setup.dart ('k') | samples/swarm/App.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698