Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: call node::Stop on exit #25501

Merged
merged 2 commits into from Sep 17, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions shell/app/node_main.cc
Expand Up @@ -153,6 +153,7 @@ int NodeMain(int argc, char* argv[]) {

exit_code = node::EmitExit(env);
env->set_can_call_into_js(false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this line need to be removed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's redundant, but it doesn't hurt to remove it.

node::Stop(env);
node::RunAtExit(env);

v8::Isolate* isolate = env->isolate();
Expand Down
1 change: 1 addition & 0 deletions shell/browser/electron_browser_main_parts.cc
Expand Up @@ -553,6 +553,7 @@ void ElectronBrowserMainParts::PostMainMessageLoopRun() {
// invoke Node/V8 APIs inside them.
node_debugger_->Stop();
node_env_->env()->set_trace_sync_io(false);
node::Stop(node_env_->env());
node_env_.reset();
js_env_->OnMessageLoopDestroying();

Expand Down