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:
authorMichaël Zasso <targos@protonmail.com>2020-09-27 18:39:01 +0300
committerAnna Henningsen <anna@addaleax.net>2020-09-30 18:52:35 +0300
commita8806535d9e7db7bf20b3b3ef8f911320baf7511 (patch)
tree157eb786752ca8ed6f59e0a5a4cab6435016a53a /lib/internal/abort_controller.js
parenta77f2ea6d436402ef4c197a470fcb3bd3a3037cd (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.js9
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 }
});