Remove window from window list before notifying closed event

This commit is contained in:
Cheng Zhao 2015-06-27 17:01:20 +08:00
parent 4b4654ec71
commit 1e514620b5
2 changed files with 4 additions and 4 deletions

View file

@ -68,8 +68,6 @@ void Window::WillCloseWindow(bool* prevent_default) {
}
void Window::OnWindowClosed() {
Emit("closed");
if (api_web_contents_) {
api_web_contents_->DestroyWebContents();
api_web_contents_ = nullptr;
@ -78,6 +76,8 @@ void Window::OnWindowClosed() {
RemoveFromWeakMap();
window_->RemoveObserver(this);
Emit("closed");
}
void Window::OnWindowBlur() {