diff options
author | Michaël Zasso <targos@protonmail.com> | 2020-09-27 18:39:01 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-09-30 18:52:35 +0300 |
commit | a8806535d9e7db7bf20b3b3ef8f911320baf7511 (patch) | |
tree | 157eb786752ca8ed6f59e0a5a4cab6435016a53a /lib/internal/abort_controller.js | |
parent | a77f2ea6d436402ef4c197a470fcb3bd3a3037cd (diff) |
lib: use Object static properties from primordials
PR-URL: https://github.com/nodejs/node/pull/35380
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Diffstat (limited to 'lib/internal/abort_controller.js')
-rw-r--r-- | lib/internal/abort_controller.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/internal/abort_controller.js b/lib/internal/abort_controller.js index 45ffb7aee8d..b3568ce2093 100644 --- a/lib/internal/abort_controller.js +++ b/lib/internal/abort_controller.js @@ -4,7 +4,8 @@ // in https://github.com/mysticatea/abort-controller (MIT license) const { - Object, + ObjectAssign, + ObjectDefineProperties, Symbol, } = primordials; @@ -24,7 +25,7 @@ function customInspect(self, obj, depth, options) { if (depth < 0) return self; - const opts = Object.assign({}, options, { + const opts = ObjectAssign({}, options, { depth: options.depth === null ? null : options.depth - 1 }); @@ -41,7 +42,7 @@ class AbortSignal extends EventTarget { } } -Object.defineProperties(AbortSignal.prototype, { +ObjectDefineProperties(AbortSignal.prototype, { aborted: { enumerable: true } }); @@ -75,7 +76,7 @@ class AbortController { } } -Object.defineProperties(AbortController.prototype, { +ObjectDefineProperties(AbortController.prototype, { signal: { enumerable: true }, abort: { enumerable: true } }); |