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

Unified Diff: ui/message_center/views/toast_contents_view.cc

Issue 15019018: Merge 198829 "Changes the order of widget Close() and DecrementD..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1500/src/
Patch Set: Created 7 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/toast_contents_view.cc
===================================================================
--- ui/message_center/views/toast_contents_view.cc (revision 200012)
+++ ui/message_center/views/toast_contents_view.cc (working copy)
@@ -214,11 +214,15 @@
void ToastContentsView::OnBoundsAnimationEndedOrCancelled(
const ui::Animation* animation) {
+ if (is_closing_ && closing_animation_ == animation && GetWidget())
+ GetWidget()->Close();
+
+ // This cannot be called before GetWidget()->Close(). Decrementing defer count
+ // will invoke update, which may invoke another close animation with
+ // incrementing defer counter. Close() after such process will cause a
+ // mismatch between increment/decrement. See crbug.com/238477
if (collection_)
collection_->DecrementDeferCounter();
-
- if (is_closing_ && closing_animation_ == animation && GetWidget())
- GetWidget()->Close();
}
// ui::AnimationDelegate
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698