lib: use Map primordial for ActiveAsyncContextFrame
PR-URL: https://github.com/nodejs/node/pull/57670 Reviewed-By: Jordan Harband <ljharb@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
This commit is contained in:
parent
17c65d1900
commit
1e95107b16
@ -2,6 +2,7 @@
|
||||
|
||||
const {
|
||||
ObjectSetPrototypeOf,
|
||||
SafeMap,
|
||||
} = primordials;
|
||||
|
||||
const {
|
||||
@ -11,7 +12,7 @@ const {
|
||||
|
||||
let enabled_;
|
||||
|
||||
class ActiveAsyncContextFrame extends Map {
|
||||
class ActiveAsyncContextFrame extends SafeMap {
|
||||
static get enabled() {
|
||||
return true;
|
||||
}
|
||||
@ -50,7 +51,7 @@ function checkEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
|
||||
class InactiveAsyncContextFrame extends Map {
|
||||
class InactiveAsyncContextFrame extends SafeMap {
|
||||
static get enabled() {
|
||||
enabled_ ??= checkEnabled();
|
||||
return enabled_;
|
||||
|
Loading…
x
Reference in New Issue
Block a user