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

Unified Diff: ui/aura/window.cc

Issue 8450018: First shot at implementing drag&drop for Aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added missing test file Created 9 years, 1 month 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/aura/window.cc
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index d1caa0416e6eab3ea3e35464644793eef6d29341..5733813c45c1773bdc21b5acf49916bc0daf4da0 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -30,10 +30,15 @@ Window::Window(WindowDelegate* delegate)
transient_parent_(NULL),
id_(-1),
user_data_(NULL),
- stops_event_propagation_(false) {
+ stops_event_propagation_(false),
+ drag_drop_delegate_(NULL) {
}
Window::~Window() {
+ // We need to NULL the drag drop delegate to prevent race condition where a
+ // drag/drop event may be sent to a window while its being destroyed.
+ drag_drop_delegate_ = NULL;
+
// Let the delegate know we're in the processing of destroying.
if (delegate_)
delegate_->OnWindowDestroying();

Powered by Google App Engine
This is Rietveld 408576698