From: Cheng Zhao Date: Wed, 26 Mar 2014 01:58:40 +0000 (+0800) Subject: Free window object immediately in destory(). X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d7261073e78329611e96b698d11960ac7d4f76d9;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Free window object immediately in destory(). This put everything back to the original design, since now it's not possible to destory a window while a context menu is showing. --- diff --git a/atom/browser/api/atom_api_window.cc b/atom/browser/api/atom_api_window.cc index 3d76592..e8a845f 100644 --- a/atom/browser/api/atom_api_window.cc +++ b/atom/browser/api/atom_api_window.cc @@ -127,9 +127,7 @@ void Window::Destroy(const v8::FunctionCallbackInfo& args) { UNWRAP_WINDOW_AND_CHECK; base::ProcessHandle handle = self->window_->GetRenderProcessHandle(); - // Just destroy the NativeWindow object, the api::Window object would be - // deleted in the coming OnWindowClosed event. - self->window_.reset(); + delete self; // Make sure the renderer process is terminated, it could happen that the // renderer process became a zombie.