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 2ae98ce

Browse filesBrowse files
cjihrigaddaleax
authored andcommitted
lib: define printErr() in script string
This commit moves the printErr() function, used by the tick profiler processer, into the code string passed to vm.runInThisContext(). PR-URL: #19285 Fixes: #19260 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 1519657 commit 2ae98ce
Copy full SHA for 2ae98ce

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+1
-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
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ scriptFiles.forEach(function(s) {
2121
script += process.binding('natives')[s] + '\n';
2222
});
2323

24-
// eslint-disable-next-line no-unused-vars
25-
function printErr(err) {
26-
console.error(err);
27-
}
28-
2924
const tickArguments = [];
3025
if (process.platform === 'darwin') {
3126
tickArguments.push('--mac');
@@ -36,6 +31,7 @@ tickArguments.push.apply(tickArguments, process.argv.slice(1));
3631
script = `(function(module, require) {
3732
arguments = ${JSON.stringify(tickArguments)};
3833
function write (s) { process.stdout.write(s) }
34+
function printErr(err) { console.error(err); }
3935
${script}
4036
})`;
4137
vm.runInThisContext(script)(module, require);

0 commit comments

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