It could happend that the JS BrowserWindow object being double deleted
when calling the destroy() method.
UNWRAP_WINDOW_AND_CHECK;
base::ProcessHandle handle = self->window_->GetRenderProcessHandle();
- base::MessageLoop::current()->DeleteSoon(FROM_HERE, self);
+ // Just destroy the NativeWindow object, the api::Window object would be
+ // deleted in the coming OnWindowClosed event.
+ self->window_.reset();
// Make sure the renderer process is terminated, it could happen that the
// renderer process became a zombie.