summaryrefslogtreecommitdiffstats
path: root/ash/drag_drop
diff options
context:
space:
mode:
authorvarunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-28 19:53:23 +0000
committervarunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-28 19:53:23 +0000
commit8260ba3e9b6f976a883da622ec652c6f7797b13e (patch)
tree1ff58cdbff86e3e37791b2908e248241da94b32a /ash/drag_drop
parent32c108222e10c7cb8bfa91139145b4d68dea5212 (diff)
downloadchromium_src-8260ba3e9b6f976a883da622ec652c6f7797b13e.zip
chromium_src-8260ba3e9b6f976a883da622ec652c6f7797b13e.tar.gz
chromium_src-8260ba3e9b6f976a883da622ec652c6f7797b13e.tar.bz2
aura: Fix crash in drag_drop_controller when another drag/drop session starts
before the previous animation is completed. BUG=134470 TEST=no crash when starting a drag session while previous drag session animates. Review URL: https://chromiumcodereview.appspot.com/10718009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144784 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/drag_drop')
-rw-r--r--ash/drag_drop/drag_drop_controller.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/ash/drag_drop/drag_drop_controller.cc b/ash/drag_drop/drag_drop_controller.cc
index 8cf03fa..51ca88d 100644
--- a/ash/drag_drop/drag_drop_controller.cc
+++ b/ash/drag_drop/drag_drop_controller.cc
@@ -257,7 +257,11 @@ void DragDropController::OnWindowDestroyed(aura::Window* window) {
void DragDropController::OnImplicitAnimationsCompleted() {
DCHECK(drag_image_.get());
- drag_image_.reset();
+
+ // By the time we finish animation, another drag/drop session may have
+ // started. We do not want to destroy the drag image in that case.
+ if (!drag_drop_in_progress_)
+ drag_image_.reset();
}
void DragDropController::StartCanceledAnimation() {