Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b700900

Browse filesBrowse files
aduh95danielleadams
authored andcommitted
lib: refactor to use more primordials
PR-URL: #35875 Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 9757b47 commit b700900
Copy full SHA for b700900

File tree

Expand file treeCollapse file tree

1 file changed

+8
-5
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-5
lines changed
Open diff view settings
Collapse file

‎lib/internal/v8_prof_processor.js‎

Copy file name to clipboardExpand all lines: lib/internal/v8_prof_processor.js
+8-5Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
'use strict';
22

33
const {
4+
ArrayPrototypePush,
5+
ArrayPrototypeSlice,
46
JSONStringify,
57
} = primordials;
68

@@ -22,17 +24,18 @@ const scriptFiles = [
2224
];
2325
let script = '';
2426

25-
scriptFiles.forEach((s) => {
27+
for (const s of scriptFiles) {
2628
script += internalBinding('natives')[s] + '\n';
27-
});
29+
}
2830

2931
const tickArguments = [];
3032
if (process.platform === 'darwin') {
31-
tickArguments.push('--mac');
33+
ArrayPrototypePush(tickArguments, '--mac');
3234
} else if (process.platform === 'win32') {
33-
tickArguments.push('--windows');
35+
ArrayPrototypePush(tickArguments, '--windows');
3436
}
35-
tickArguments.push.apply(tickArguments, process.argv.slice(1));
37+
ArrayPrototypePush(tickArguments,
38+
...ArrayPrototypeSlice(process.argv, 1));
3639
script = `(function(module, require) {
3740
arguments = ${JSONStringify(tickArguments)};
3841
function write (s) { process.stdout.write(s) }

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.