diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index 5363c224e76f..0360a6a19c68 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -495,6 +495,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();