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 37b5ce2

Browse filesBrowse files
Trotttargos
authored andcommitted
debugger: fix race condition/deadlock on initialization
PR-URL: #38161 Refs: https://github.com/nodejs/node/discussions/36481 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Michaël Zasso <targos@protonmail.com>
1 parent 93b0c78 commit 37b5ce2
Copy full SHA for 37b5ce2

File tree

Expand file treeCollapse file tree

1 file changed

+10
-13
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-13
lines changed
Open diff view settings
Collapse file

‎lib/internal/inspector/inspect_repl.js‎

Copy file name to clipboardExpand all lines: lib/internal/inspector/inspect_repl.js
+10-13Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,19 +1062,16 @@ function createRepl(inspector) {
10621062
}
10631063

10641064
function initAfterStart() {
1065-
const setupTasks = [
1066-
Runtime.enable(),
1067-
Profiler.enable(),
1068-
Profiler.setSamplingInterval({ interval: 100 }),
1069-
Debugger.enable(),
1070-
Debugger.setPauseOnExceptions({ state: 'none' }),
1071-
Debugger.setAsyncCallStackDepth({ maxDepth: 0 }),
1072-
Debugger.setBlackboxPatterns({ patterns: [] }),
1073-
Debugger.setPauseOnExceptions({ state: pauseOnExceptionState }),
1074-
restoreBreakpoints(),
1075-
Runtime.runIfWaitingForDebugger(),
1076-
];
1077-
return Promise.all(setupTasks);
1065+
return Runtime.enable()
1066+
.then(() => Profiler.enable())
1067+
.then(() => Profiler.setSamplingInterval({ interval: 100 }))
1068+
.then(() => Debugger.enable())
1069+
.then(() => Debugger.setPauseOnExceptions({ state: 'none' }))
1070+
.then(() => Debugger.setAsyncCallStackDepth({ maxDepth: 0 }))
1071+
.then(() => Debugger.setBlackboxPatterns({ patterns: [] }))
1072+
.then(() => Debugger.setPauseOnExceptions({ state: pauseOnExceptionState }))
1073+
.then(() => restoreBreakpoints())
1074+
.then(() => Runtime.runIfWaitingForDebugger())
10781075
}
10791076

10801077
return function startRepl() {

0 commit comments

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