Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2019-03-22 05:44:26 +0300
committerRuben Bridgewater <ruben@bridgewater.de>2019-03-27 19:20:06 +0300
commitb08a867d6016ccf04783a0f91fdbcc3460daf234 (patch)
tree5df4b30220cde5ae5eac9ed956c9badac6ba08af /lib/internal/freeze_intrinsics.js
parentfd992e6e36bb4b01a6ceb71cfeb3bae640b492a6 (diff)
benchmark,doc,lib: capitalize more comments
PR-URL: https://github.com/nodejs/node/pull/26849 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Diffstat (limited to 'lib/internal/freeze_intrinsics.js')
-rw-r--r--lib/internal/freeze_intrinsics.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/internal/freeze_intrinsics.js b/lib/internal/freeze_intrinsics.js
index effac318539..5d58121a255 100644
--- a/lib/internal/freeze_intrinsics.js
+++ b/lib/internal/freeze_intrinsics.js
@@ -14,7 +14,7 @@
// limitations under the License.
// SPDX-License-Identifier: MIT
-// based upon:
+// Based upon:
// https://github.com/google/caja/blob/master/src/com/google/caja/ses/startSES.js
// https://github.com/google/caja/blob/master/src/com/google/caja/ses/repairES5.js
// https://github.com/tc39/proposal-frozen-realms/blob/91ac390e3451da92b5c27e354b39e52b7636a437/shim/src/deep-freeze.js
@@ -176,11 +176,11 @@ module.exports = function() {
// NB: handle for any new cases in future
}
if (frozenSet.has(val) || freezingSet.has(val)) {
- // todo use uncurried form
+ // TODO: Use uncurried form
// Ignore if already frozen or freezing
return;
}
- freezingSet.add(val); // todo use uncurried form
+ freezingSet.add(val); // TODO: Use uncurried form
}
function doFreeze(obj) {
@@ -201,8 +201,8 @@ module.exports = function() {
const descs = getOwnPropertyDescriptors(obj);
enqueue(proto);
ownKeys(descs).forEach((name) => {
- // todo uncurried form
- // todo: getOwnPropertyDescriptors is guaranteed to return well-formed
+ // TODO: Uncurried form
+ // TODO: getOwnPropertyDescriptors is guaranteed to return well-formed
// descriptors, but they still inherit from Object.prototype. If
// someone has poisoned Object.prototype to add 'value' or 'get'
// properties, then a simple 'if ("value" in desc)' or 'desc.value'
@@ -222,12 +222,12 @@ module.exports = function() {
function dequeue() {
// New values added before forEach() has finished will be visited.
- freezingSet.forEach(doFreeze); // todo curried forEach
+ freezingSet.forEach(doFreeze); // TODO: Curried forEach
}
function commit() {
- // todo curried forEach
- // we capture the real WeakSet.prototype.add above, in case someone
+ // TODO: Curried forEach
+ // We capture the real WeakSet.prototype.add above, in case someone
// changes it. The two-argument form of forEach passes the second
// argument as the 'this' binding, so we add to the correct set.
freezingSet.forEach(frozenSet.add, frozenSet);