summaryrefslogtreecommitdiff
path: root/lib/trace_events.js
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/trace_events.js
parent5904dfcc9c70b79971ab09dacd711e5c13d7120c (diff)
downloadnode-new-141a6e34eed05577edf43ad085a74f330d0559cb.tar.gz
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/trace_events.js')
-rw-r--r--lib/trace_events.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/trace_events.js b/lib/trace_events.js
index f142afded1..5ec50d32c6 100644
--- a/lib/trace_events.js
+++ b/lib/trace_events.js
@@ -1,5 +1,9 @@
'use strict';
+const {
+ ArrayIsArray,
+} = primordials;
+
const { hasTracing } = internalBinding('config');
const kHandle = Symbol('handle');
const kEnabled = Symbol('enabled');
@@ -76,7 +80,7 @@ function createTracing(options) {
if (typeof options !== 'object' || options === null)
throw new ERR_INVALID_ARG_TYPE('options', 'object', options);
- if (!Array.isArray(options.categories)) {
+ if (!ArrayIsArray(options.categories)) {
throw new ERR_INVALID_ARG_TYPE('options.categories', 'string[]',
options.categories);
}