Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
lib: refactor to avoid unsafe array iteration
PR-URL: #40271
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
  • Loading branch information
aduh95 authored and targos committed Oct 4, 2021
1 parent a75a8f2 commit 3d5eba8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/internal/v8_prof_processor.js
Expand Up @@ -2,6 +2,7 @@

const {
ArrayPrototypePush,
ArrayPrototypePushApply,
ArrayPrototypeSlice,
StringPrototypeSlice,
} = primordials;
Expand All @@ -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,
Expand Down

0 comments on commit 3d5eba8

Please sign in to comment.