diff --git a/lib/internal/v8_prof_processor.js b/lib/internal/v8_prof_processor.js index ddfafca64c45f0..4ed6fe8b9b3902 100644 --- a/lib/internal/v8_prof_processor.js +++ b/lib/internal/v8_prof_processor.js @@ -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,