mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
lib: make safe primordials safe to iterate
PR-URL: https://github.com/nodejs/node/pull/36391 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
committed by
Node.js GitHub Bot
parent
7c808170f5
commit
0a5969c62a
@@ -1,6 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const {
|
||||
ArrayPrototypeForEach,
|
||||
ArrayPrototypeMap,
|
||||
ArrayPrototypePush,
|
||||
FunctionPrototypeBind,
|
||||
@@ -315,8 +316,7 @@ class WritableWorkerStdio extends Writable {
|
||||
[kStdioWantsMoreDataCallback]() {
|
||||
const cbs = this[kWritableCallbacks];
|
||||
this[kWritableCallbacks] = [];
|
||||
for (const cb of cbs)
|
||||
cb();
|
||||
ArrayPrototypeForEach(cbs, (cb) => cb());
|
||||
if ((this[kPort][kWaitingStreams] -= cbs.length) === 0)
|
||||
this[kPort].unref();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user