summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/tabs/tab.h
diff options
context:
space:
mode:
authorfinnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-06 21:29:26 +0000
committerfinnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-06 21:29:26 +0000
commite411d0e99212aca1d30366c82a9266a58bfadd98 (patch)
treec62b5ccad00d4f8dc586dfd3c06b49d848506003 /chrome/browser/views/tabs/tab.h
parent5e767712d2ebec5966472021c90f9700a8a6eda1 (diff)
downloadchromium_src-e411d0e99212aca1d30366c82a9266a58bfadd98.zip
chromium_src-e411d0e99212aca1d30366c82a9266a58bfadd98.tar.gz
chromium_src-e411d0e99212aca1d30366c82a9266a58bfadd98.tar.bz2
Applying patch for Mohamed Mansour (reviewed by pkasting): http://codereview.chromium.org/16246
CRASH at Tab::OnMouseReleased Some strange thing is happening that it crashes for view::HitTest, it can never ENTER that function. It seems that the tab is being destroyed and as pkasting stated on IRC: "Part of this may be because our retarded Views designs can't distinguish which buttons are being held versus clicked in these sorts of cases (I filed a bug on this about a year and a half ago, internally)" When a tab has ended dragging (EndDrag), if something was being dragged and you end it, it actually cleans the TabDelegate and assigns its value to 'freed memory' which is 0xfeeefeee. Therefore it crashes while dragging, because the object no longer exists. I couldn't do if (delegate_) cause that always returns true since delegate has 0xfeeefeee. So I just changed the return type from void to bool for underlying EndDragImpl and pumped it to tab.cc. That way, we can know if a tab is destroyed or not. BUG=5819 (http://crbug.com/5819) TEST=Dragging tabs around, closing while dragging, and closing tabs. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7615 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/tabs/tab.h')
-rw-r--r--chrome/browser/views/tabs/tab.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/views/tabs/tab.h b/chrome/browser/views/tabs/tab.h
index 17134e1..de3c981 100644
--- a/chrome/browser/views/tabs/tab.h
+++ b/chrome/browser/views/tabs/tab.h
@@ -66,8 +66,9 @@ class Tab : public TabRenderer,
virtual void ContinueDrag(const views::MouseEvent& event) = 0;
// Ends dragging a Tab. |canceled| is true if the drag was aborted in a way
- // other than the user releasing the mouse.
- virtual void EndDrag(bool canceled) = 0;
+ // other than the user releasing the mouse. Returns whether the tab has been
+ // destroyed.
+ virtual bool EndDrag(bool canceled) = 0;
};
explicit Tab(TabDelegate* delegate);