mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: destroy node platform after destroying wrappers (#22535)
Co-authored-by: Cheng Zhao <zcbenz@electronjs.org>
This commit is contained in:
@@ -517,9 +517,6 @@ void ElectronBrowserMainParts::PostMainMessageLoopRun() {
|
||||
ui::SetX11ErrorHandlers(X11EmptyErrorHandler, X11EmptyIOErrorHandler);
|
||||
#endif
|
||||
|
||||
node_debugger_->Stop();
|
||||
js_env_->OnMessageLoopDestroying();
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
FreeAppDelegate();
|
||||
#endif
|
||||
@@ -536,6 +533,11 @@ void ElectronBrowserMainParts::PostMainMessageLoopRun() {
|
||||
++iter;
|
||||
}
|
||||
|
||||
// Destroy node platform after all destructors_ are executed, as they may
|
||||
// invoke Node/V8 APIs inside them.
|
||||
node_debugger_->Stop();
|
||||
js_env_->OnMessageLoopDestroying();
|
||||
|
||||
fake_browser_process_->PostMainMessageLoopRun();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user