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

Unified Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc

Issue 214083004: Prevents crash when a menu gets closed during drag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Prevents crash when a menu gets closed during drag (removed unnecessary part of the change) Created 6 years, 9 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/views/widget/desktop_aura/desktop_native_widget_aura.cc
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
index 8341bce675d29b5de1eff717030e4c6da89d45f6..677f3db8b4c1e3d2007273bc364d11051e6b2c5c 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -490,8 +490,7 @@ void DesktopNativeWidgetAura::InitNativeWidget(
window_tree_client_.reset(
new DesktopNativeWidgetAuraWindowTreeClient(host_->window()));
- drop_helper_.reset(new DropHelper(
- static_cast<internal::RootView*>(GetWidget()->GetRootView())));
+ drop_helper_.reset(new DropHelper(GetWidget()->GetRootView()));
aura::client::SetDragDropDelegate(content_window_, this);
tooltip_manager_.reset(new TooltipManagerAura(GetWidget()));
@@ -591,6 +590,8 @@ void DesktopNativeWidgetAura::ReorderNativeViews() {
}
void DesktopNativeWidgetAura::ViewRemoved(View* view) {
+ DCHECK(drop_helper_.get() != NULL);
+ drop_helper_->ResetTargetViewIfEquals(view);
varkha 2014/03/31 17:40:52 This is same as the code in NativeWidgetAura::View
}
void DesktopNativeWidgetAura::SetNativeWindowProperty(const char* name,
« 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