From 141a6e34eed05577edf43ad085a74f330d0559cb Mon Sep 17 00:00:00 2001 From: Michaƫl Zasso Date: Sat, 23 Nov 2019 10:09:05 +0100 Subject: lib: enforce use of Array from primordials PR-URL: https://github.com/nodejs/node/pull/30635 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Joyee Cheung --- lib/internal/util/comparisons.js | 3 ++- lib/internal/util/inspect.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/internal/util') 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, -- cgit v1.2.3