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

Unified Diff: sdk/lib/io/timer_impl.dart

Issue 11361190: a === b -> identical(a, b) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 1 month 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 | « sdk/lib/io/string_stream.dart ('k') | sdk/lib/io/websocket_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/timer_impl.dart
diff --git a/sdk/lib/io/timer_impl.dart b/sdk/lib/io/timer_impl.dart
index d82c69c23e69c7a40e7cd5602f973f68800f3cda..2e78eba96708eb0078826649171a300588fe39a6 100644
--- a/sdk/lib/io/timer_impl.dart
+++ b/sdk/lib/io/timer_impl.dart
@@ -13,7 +13,7 @@ class _Timer implements Timer {
int milliSeconds,
bool repeating) {
_EventHandler._start();
- if (_timers === null) {
+ if (_timers == null) {
_timers = new DoubleLinkedQueue<_Timer>();
}
Timer timer = new _Timer._internal();
@@ -51,8 +51,8 @@ class _Timer implements Timer {
DoubleLinkedQueueEntry<_Timer> entry = _timers.firstEntry();
DoubleLinkedQueueEntry<_Timer> first = _timers.firstEntry();
- while (entry !== null) {
- if (entry.element === this) {
+ while (entry != null) {
+ if (identical(entry.element, this)) {
entry.remove();
if (first.element == this) {
entry = _timers.firstEntry();
@@ -72,10 +72,10 @@ class _Timer implements Timer {
// earliest timer in the list. Timers with the same wakeup time are enqueued
// in order and notified in FIFO order.
void _addTimerToList() {
- if (_callback !== null) {
+ if (_callback != null) {
DoubleLinkedQueueEntry<_Timer> entry = _timers.firstEntry();
- while (entry !== null) {
+ while (entry != null) {
if (_wakeupTime < entry.element._wakeupTime) {
entry.prepend(this);
return;
@@ -95,15 +95,15 @@ class _Timer implements Timer {
return;
}
- if (_timers.firstEntry() === null) {
+ if (_timers.firstEntry() == null) {
// No pending timers: Close the receive port and let the event handler
// know.
- if (_receivePort !== null) {
+ if (_receivePort != null) {
_EventHandler._sendData(null, _receivePort, _NO_TIMER);
_shutdownTimerHandler();
}
} else {
- if (_receivePort === null) {
+ if (_receivePort == null) {
// Create a receive port and register a message handler for the timer
// events.
_createTimerHandler();
@@ -126,7 +126,7 @@ class _Timer implements Timer {
// Collect all pending timers.
DoubleLinkedQueueEntry<_Timer> entry = _timers.firstEntry();
var pending_timers = new List();
- while (entry !== null) {
+ while (entry != null) {
_Timer timer = entry.element;
if (timer._wakeupTime <= currentTime) {
entry.remove();
@@ -160,7 +160,7 @@ class _Timer implements Timer {
_notifyEventHandler();
}
- if(_receivePort === null) {
+ if(_receivePort == null) {
_receivePort = new ReceivePort();
_receivePort.receive((var message, ignored) {
_handleTimeout();
« no previous file with comments | « sdk/lib/io/string_stream.dart ('k') | sdk/lib/io/websocket_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698