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

Side by Side Diff: sdk/lib/io/timer_impl.dart

Issue 15823008: Fix bug in VM timer implementation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: update test status Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/isolate/isolate.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.io; 5 part of dart.io;
6 6
7 class _Timer implements Timer { 7 class _Timer implements Timer {
8 // Set jitter to wake up timer events that would happen in _TIMER_JITTER ms. 8 // Set jitter to wake up timer events that would happen in _TIMER_JITTER ms.
9 static const int _TIMER_JITTER = 0; 9 static const int _TIMER_JITTER = 0;
10 10
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 if (timer._callback != null) { 151 if (timer._callback != null) {
152 timer._callback(timer); 152 timer._callback(timer);
153 if (timer._repeating) { 153 if (timer._repeating) {
154 timer._advanceWakeupTime(); 154 timer._advanceWakeupTime();
155 timer._addTimerToList(); 155 timer._addTimerToList();
156 } 156 }
157 } 157 }
158 } 158 }
159 } finally { 159 } finally {
160 _handling_callbacks = false; 160 _handling_callbacks = false;
161 _notifyEventHandler();
161 } 162 }
162 _notifyEventHandler();
163 } 163 }
164 164
165 if(_receivePort == null) { 165 if(_receivePort == null) {
166 _receivePort = new ReceivePort(); 166 _receivePort = new ReceivePort();
167 _receivePort.receive((var message, ignored) { 167 _receivePort.receive((var message, ignored) {
168 _handleTimeout(); 168 _handleTimeout();
169 }); 169 });
170 } 170 }
171 } 171 }
172 172
(...skipping 20 matching lines...) Expand all
193 _getTimerFactoryClosure() { 193 _getTimerFactoryClosure() {
194 return (int milliSeconds, void callback(Timer timer), bool repeating) { 194 return (int milliSeconds, void callback(Timer timer), bool repeating) {
195 if (repeating) { 195 if (repeating) {
196 return new _Timer.periodic(milliSeconds, callback); 196 return new _Timer.periodic(milliSeconds, callback);
197 } 197 }
198 return new _Timer(milliSeconds, callback); 198 return new _Timer(milliSeconds, callback);
199 }; 199 };
200 } 200 }
201 201
202 202
OLDNEW
« no previous file with comments | « no previous file | tests/isolate/isolate.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698