mirror of
https://github.com/electron/electron.git
synced 2026-01-25 15:28:11 -05:00
BrowserWindow.destroy() should not delete window immediately.
It could cause crash when context menu is showing.
This commit is contained in:
@@ -127,7 +127,7 @@ void Window::Destroy(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||
UNWRAP_WINDOW_AND_CHECK;
|
||||
|
||||
base::ProcessHandle handle = self->window_->GetRenderProcessHandle();
|
||||
delete self;
|
||||
base::MessageLoop::current()->DeleteSoon(FROM_HERE, self);
|
||||
|
||||
// Make sure the renderer process is terminated, it could happen that the
|
||||
// renderer process became a zombie.
|
||||
|
||||
Reference in New Issue
Block a user