summaryrefslogtreecommitdiff
path: root/lib/internal/util
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2019-11-23 10:09:05 +0100
committerMichaël Zasso <targos@protonmail.com>2019-11-27 19:29:01 +0100
commit141a6e34eed05577edf43ad085a74f330d0559cb (patch)
tree1d66ed917d299069b79d34abe1493d18dcb5e138 /lib/internal/util
parent5904dfcc9c70b79971ab09dacd711e5c13d7120c (diff)
downloadandroid-node-v8-141a6e34eed05577edf43ad085a74f330d0559cb.tar.gz
android-node-v8-141a6e34eed05577edf43ad085a74f330d0559cb.tar.bz2
android-node-v8-141a6e34eed05577edf43ad085a74f330d0559cb.zip
lib: enforce use of Array from primordials
PR-URL: https://github.com/nodejs/node/pull/30635 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'lib/internal/util')
-rw-r--r--lib/internal/util/comparisons.js3
-rw-r--r--lib/internal/util/inspect.js1
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/internal/util/comparisons.js b/lib/internal/util/comparisons.js
index 3af44f9bf5..b278421717 100644
--- a/lib/internal/util/comparisons.js
+++ b/lib/internal/util/comparisons.js
@@ -1,6 +1,7 @@
'use strict';
const {
+ ArrayIsArray,
BigIntPrototypeValueOf,
BooleanPrototypeValueOf,
DatePrototypeGetTime,
@@ -163,7 +164,7 @@ function innerDeepEqual(val1, val2, strict, memos) {
if (val1Tag !== val2Tag) {
return false;
}
- if (Array.isArray(val1)) {
+ if (ArrayIsArray(val1)) {
// Check for sparse arrays and general fast path
if (val1.length !== val2.length) {
return false;
diff --git a/lib/internal/util/inspect.js b/lib/internal/util/inspect.js
index 0b02e9be51..89237a09a5 100644
--- a/lib/internal/util/inspect.js
+++ b/lib/internal/util/inspect.js
@@ -1,6 +1,7 @@
'use strict';
const {
+ Array,
ArrayIsArray,
BigIntPrototypeValueOf,
BooleanPrototypeValueOf,