Browse Source

fix: reset node env earlier during shutdown (#23069)

Co-authored-by: Jeremy Apthorp <[email protected]>
trop[bot] 5 years ago
parent
commit
7316ebde79
1 changed files with 1 additions and 0 deletions
  1. 1 0
      shell/browser/electron_browser_main_parts.cc

+ 1 - 0
shell/browser/electron_browser_main_parts.cc

@@ -541,6 +541,7 @@ void ElectronBrowserMainParts::PostMainMessageLoopRun() {
   // Destroy node platform after all destructors_ are executed, as they may
   // invoke Node/V8 APIs inside them.
   node_debugger_->Stop();
+  node_env_.reset();
   js_env_->OnMessageLoopDestroying();
 
   fake_browser_process_->PostMainMessageLoopRun();