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

Unified Diff: ui/views/controls/button/custom_button.cc

Issue 1494433003: Fixes a crash when InkDropDelegate gets destroyed after its InkDropHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes a crash when InkDropDelegate gets destroyed after its InkDropHost (corrections and test) Created 5 years 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
Index: ui/views/controls/button/custom_button.cc
diff --git a/ui/views/controls/button/custom_button.cc b/ui/views/controls/button/custom_button.cc
index bfc356c595d5577d1ee7e8e73347e5a8a0f68ed1..c41967a57931d5081e6946048013c5c3c8c39756 100644
--- a/ui/views/controls/button/custom_button.cc
+++ b/ui/views/controls/button/custom_button.cc
@@ -56,6 +56,9 @@ CustomButton* CustomButton::AsCustomButton(views::View* view) {
}
CustomButton::~CustomButton() {
+ // InkDropDelegate needs to be destroyed by now since it may need to call
+ // methods on |this| via InkDropHost.
+ DCHECK(!ink_drop_delegate_);
}
void CustomButton::SetState(ButtonState state) {

Powered by Google App Engine
This is Rietveld 408576698