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

Issue 16246: CRASH at Tab::OnMouseReleased... (Closed)

Created:
12 years ago by Mohamed Mansour (USE mhm)
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

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.

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 1

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 1

Patch Set 6 : '' #

Total comments: 9

Patch Set 7 : '' #

Patch Set 8 : '' #

Total comments: 8

Patch Set 9 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -16 lines) Patch
M chrome/browser/views/tabs/dragged_tab_controller.h View 7 8 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/views/tabs/dragged_tab_controller.cc View 3 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/views/tabs/tab.h View 1 6 7 8 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/views/tabs/tab.cc View 1 2 3 4 5 6 1 chunk +7 lines, -3 lines 0 comments Download
M chrome/browser/views/tabs/tab_strip.h View 1 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/views/tabs/tab_strip.cc View 1 6 7 8 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
Mohamed Mansour (USE mhm)
12 years ago (2008-12-23 20:44:34 UTC) #1
Peter Kasting
Let me see if I have this straight. The issue is that calling delegate_->EndDrag() may ...
12 years ago (2008-12-24 03:28:28 UTC) #2
Mohamed Mansour (USE mhm)
Sorry if I wasn't clear. On 2008/12/24 03:28:28, pkasting wrote: > Let me see if ...
12 years ago (2008-12-24 03:55:01 UTC) #3
Peter Kasting
On 2008/12/24 03:55:01, Mohamed Mansour wrote: > On 2008/12/24 03:28:28, pkasting wrote: > > Let ...
12 years ago (2008-12-24 04:08:42 UTC) #4
Mohamed Mansour (USE mhm)
On 2008/12/24 04:08:42, pkasting wrote: > I don't understand this sentence. It crashes right where ...
12 years ago (2008-12-24 04:29:18 UTC) #5
Peter Kasting
On 2008/12/24 04:29:18, Mohamed Mansour wrote: > the original crash was when it trying to ...
12 years ago (2008-12-24 17:24:47 UTC) #6
Mohamed Mansour (USE mhm)
On 2008/12/24 17:24:47, pkasting wrote: > Crashing trying to call member functions or access member ...
12 years ago (2008-12-25 01:47:49 UTC) #7
Peter Kasting
It might be good to find who worked on the tab dragging implementation and throw ...
11 years, 12 months ago (2008-12-26 06:36:22 UTC) #8
sky
http://codereview.chromium.org/16246/diff/604/220 File chrome/browser/views/tabs/tab.cc (right): http://codereview.chromium.org/16246/diff/604/220#newcode186 Line 186: if (closing()) If the tab can be destroyed ...
11 years, 11 months ago (2009-01-05 22:24:55 UTC) #9
Peter Kasting
On 2009/01/05 22:24:55, sky wrote: > If the tab can be destroyed when invoking EndDrag ...
11 years, 11 months ago (2009-01-05 23:24:24 UTC) #10
Mohamed Mansour (USE mhm)
Alright! I have updated the patch again, according to what sky said on irc: "<sky__> ...
11 years, 11 months ago (2009-01-06 04:36:04 UTC) #11
Peter Kasting
http://codereview.chromium.org/16246/diff/222/607 File chrome/browser/views/tabs/tab.cc (right): http://codereview.chromium.org/16246/diff/222/607#newcode181 Line 181: // In some cases, ending the drag will ...
11 years, 11 months ago (2009-01-06 18:10:22 UTC) #12
Avi (use Gerrit)
http://codereview.chromium.org/16246/diff/222/609 File chrome/browser/views/tabs/tab.h (right): http://codereview.chromium.org/16246/diff/222/609#newcode68 Line 68: // Ends dragging a Tab. Returns true if ...
11 years, 11 months ago (2009-01-06 18:59:06 UTC) #13
Mohamed Mansour (USE mhm)
http://codereview.chromium.org/16246/diff/222/607 File chrome/browser/views/tabs/tab.cc (right): http://codereview.chromium.org/16246/diff/222/607#newcode181 Line 181: // In some cases, ending the drag will ...
11 years, 11 months ago (2009-01-06 19:32:34 UTC) #14
Peter Kasting
LGTM with spelling nits http://codereview.chromium.org/16246/diff/1011/243 File chrome/browser/views/tabs/dragged_tab_controller.h (right): http://codereview.chromium.org/16246/diff/1011/243#newcode60 Line 60: // begun. Returns weather ...
11 years, 11 months ago (2009-01-06 20:32:47 UTC) #15
Mohamed Mansour (USE mhm)
11 years, 11 months ago (2009-01-06 20:48:33 UTC) #16
Had a feeling that spelling was wrong :/ I will be more careful next time.

http://codereview.chromium.org/16246/diff/1011/243
File chrome/browser/views/tabs/dragged_tab_controller.h (right):

http://codereview.chromium.org/16246/diff/1011/243#newcode60
Line 60: // begun. Returns weather the tab has been destroyed.
On 2009/01/06 20:32:47, pkasting wrote:
> Nit: "weather" -> "whether"

Done.

http://codereview.chromium.org/16246/diff/1011/243#newcode189
Line 189: // Does the work for EndDrag. Returns weather the tab has been
destroyed.
On 2009/01/06 20:32:47, pkasting wrote:
> Same nit (or else don't add comment)

Done.

http://codereview.chromium.org/16246/diff/1011/240
File chrome/browser/views/tabs/tab.h (right):

http://codereview.chromium.org/16246/diff/1011/240#newcode69
Line 69: // other than the user releasing the mouse. Returns weather the tab has
been
On 2009/01/06 20:32:47, pkasting wrote:
> Nit: "weather" -> "whether"

Done.

http://codereview.chromium.org/16246/diff/1011/239
File chrome/browser/views/tabs/tab_strip.cc (right):

http://codereview.chromium.org/16246/diff/1011/239#newcode1026
Line 1026: if (drag_controller_.get())
On 2009/01/06 20:32:47, pkasting wrote:
> Nit: I might do
> 
> return drag_controller_.get() ? drag_controller_->EndDrag(canceled) : false;

Done.

Powered by Google App Engine
This is Rietveld 408576698