summaryrefslogtreecommitdiff
path: root/lib/internal/linkedlist.js
diff options
context:
space:
mode:
authorjedireza <reza@akhavan.me>2016-10-29 15:54:27 -0700
committerRoman Reiss <me@silverwind.io>2016-11-01 23:48:57 +0100
commit62d8134c50a1f65d6c0ae139e60e0cac701c8a84 (patch)
treef46aee1597b9415fc9610c611f2cb454fa39b4a3 /lib/internal/linkedlist.js
parente658f5b066e1861c6ab2ec76d9ae2a2d132aa5dd (diff)
downloadandroid-node-v8-62d8134c50a1f65d6c0ae139e60e0cac701c8a84.tar.gz
android-node-v8-62d8134c50a1f65d6c0ae139e60e0cac701c8a84.tar.bz2
android-node-v8-62d8134c50a1f65d6c0ae139e60e0cac701c8a84.zip
lib: change == to === in linkedlist
Also removed a TODO comment that is no longer viable and left a note about the potentially confusing property naming convention for future readers. PR-URL: https://github.com/nodejs/node/pull/9362 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
Diffstat (limited to 'lib/internal/linkedlist.js')
-rw-r--r--lib/internal/linkedlist.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/internal/linkedlist.js b/lib/internal/linkedlist.js
index 15f06c0efe..40bca91de2 100644
--- a/lib/internal/linkedlist.js
+++ b/lib/internal/linkedlist.js
@@ -16,7 +16,7 @@ exports.create = create;
// show the most idle item
function peek(list) {
- if (list._idlePrev == list) return null;
+ if (list._idlePrev === list) return null;
return list._idlePrev;
}
exports.peek = peek;
@@ -54,7 +54,7 @@ function append(list, item) {
}
// items are linked with _idleNext -> (older) and _idlePrev -> (newer)
- // TODO: swap the linkage to match the intuitive older items at "prev"
+ // Note: This linkage (next being older) may seem counter-intuitive at first.
item._idleNext = list._idleNext;
item._idlePrev = list;