mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
lib: refactor to avoid unsafe array iteration
PR-URL: https://github.com/nodejs/node/pull/40271 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
This commit is contained in:
committed by
Node.js GitHub Bot
parent
5ae72b712c
commit
e2382d0ce0
@@ -2,6 +2,7 @@
|
||||
|
||||
const {
|
||||
ArrayPrototypePush,
|
||||
ArrayPrototypePushApply,
|
||||
ArrayPrototypeSlice,
|
||||
StringPrototypeSlice,
|
||||
} = primordials;
|
||||
@@ -27,8 +28,8 @@ async function linker(specifier, referencingModule) {
|
||||
} else if (process.platform === 'win32') {
|
||||
ArrayPrototypePush(tickArguments, '--windows');
|
||||
}
|
||||
ArrayPrototypePush(tickArguments,
|
||||
...ArrayPrototypeSlice(process.argv, 1));
|
||||
ArrayPrototypePushApply(tickArguments,
|
||||
ArrayPrototypeSlice(process.argv, 1));
|
||||
|
||||
const context = vm.createContext({
|
||||
arguments: tickArguments,
|
||||
|
||||
Reference in New Issue
Block a user