Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Unified Diff: views/widget/widget.cc

Issue 7727001: Adds yet more debugging in hopes of tracking 91396. The latest data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add back include merge stripped out Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/widget/widget.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/widget.cc
diff --git a/views/widget/widget.cc b/views/widget/widget.cc
index 07a6687a2eb13eb55aa613de75cb4e491245faa2..c8fa738961ba4e57ee0346bbcb13795b8332a6c6 100644
--- a/views/widget/widget.cc
+++ b/views/widget/widget.cc
@@ -153,10 +153,13 @@ Widget::Widget()
saved_maximized_state_(false),
minimum_size_(100, 100),
focus_on_creation_(true),
- is_top_level_(false) {
+ is_top_level_(false),
+ destroy_state_(DESTROY_STATE_NONE) {
}
Widget::~Widget() {
+ destroy_state_ = DESTROY_STATE_DELETED;
+
while (!event_stack_.empty()) {
event_stack_.top()->reset();
event_stack_.pop();
@@ -856,12 +859,17 @@ void Widget::OnNativeWidgetCreated() {
void Widget::OnNativeWidgetDestroying() {
FOR_EACH_OBSERVER(Observer, observers_, OnWidgetClosing(this));
+ if (destroy_state_ == DESTROY_STATE_NONE)
+ destroy_state_ = DESTROY_STATE_IN_DESTROYING;
if (non_client_view_)
non_client_view_->WindowClosing();
widget_delegate_->WindowClosing();
}
void Widget::OnNativeWidgetDestroyed() {
+ if (destroy_state_ == DESTROY_STATE_IN_DESTROYING ||
+ destroy_state_ == DESTROY_STATE_NONE)
+ destroy_state_ = DESTROY_STATE_DESTROYED;
widget_delegate_->DeleteDelegate();
widget_delegate_ = NULL;
}
« no previous file with comments | « views/widget/widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698