diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-04 01:58:20 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-04 01:58:20 +0000 |
commit | 975967a16155b8cc18a1f47db8de2212f25b456f (patch) | |
tree | 7041aee4261522bc87eb42449191cbd43744bb1a /chrome/browser/gtk/tabs/tab_strip_gtk.cc | |
parent | d0a16897e8b07c062d3716b910eeac2754c57859 (diff) | |
download | chromium_src-975967a16155b8cc18a1f47db8de2212f25b456f.zip chromium_src-975967a16155b8cc18a1f47db8de2212f25b456f.tar.gz chromium_src-975967a16155b8cc18a1f47db8de2212f25b456f.tar.bz2 |
GTK: fix a tab dragging crasher.
The crash was a result of the early exit in EndDragImpl. When EndDragImpl is called due to a TAB_CONTENTS_DESTROYED notification and we exit early the DragController() doesn't get destroyed. We get a Drag() call afterwords, and call into a stale dragged_contents_. I fixed this by removing the early exit (instead checking dragged_tab_ before trying to clean up the drag, in case it hadn't started).
The change to EnsureDraggedTab() should not have any functional effect; it just makes the control flow clearer.
The new dragged_controller_ check should also not have any functional effect; it just seems safer to check it.
BUG=25326
TEST=manual (see bug for repro steps)
Review URL: http://codereview.chromium.org/668010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40589 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/tabs/tab_strip_gtk.cc')
-rw-r--r-- | chrome/browser/gtk/tabs/tab_strip_gtk.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/chrome/browser/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/gtk/tabs/tab_strip_gtk.cc index 3a811c8..b038fc8 100644 --- a/chrome/browser/gtk/tabs/tab_strip_gtk.cc +++ b/chrome/browser/gtk/tabs/tab_strip_gtk.cc @@ -667,8 +667,7 @@ bool TabStripGtk::IsAnimating() const { } void TabStripGtk::DestroyDragController() { - if (IsDragSessionActive()) - drag_controller_.reset(NULL); + drag_controller_.reset(); } void TabStripGtk::DestroyDraggedSourceTab(TabGtk* tab) { |