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 00e020b

Browse filesBrowse files
committed
src: disallow JS execution during exit()
This is just an extra safeguard – no JS should run once we’ve decided that we are going to shutdown the process, but we’re opening a handle scope in order to access V8, so make sure that our operations do not lead to JS accidentally being run. PR-URL: #35020 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com>
1 parent 1dce35d commit 00e020b
Copy full SHA for 00e020b

File tree

Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed
Open diff view settings
Collapse file

‎src/env.cc‎

Copy file name to clipboardExpand all lines: src/env.cc
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,6 +950,8 @@ uv_key_t Environment::thread_local_env = {};
950950
void Environment::Exit(int exit_code) {
951951
if (options()->trace_exit) {
952952
HandleScope handle_scope(isolate());
953+
Isolate::DisallowJavascriptExecutionScope disallow_js(
954+
isolate(), Isolate::DisallowJavascriptExecutionScope::CRASH_ON_FAILURE);
953955

954956
if (is_main_thread()) {
955957
fprintf(stderr, "(node:%d) ", uv_os_getpid());

0 commit comments

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