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

Issue 335048: [Mac] Prevent using tab context menu after tab closed. (Closed)

Created:
11 years, 1 month ago by Scott Hess - ex-Googler
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

[Mac] Prevent using tab context menu after tab closed. JavaScript can close windows while in the event loop processing a right-click menu. This change prevents sending messages to the tab controller after it has been closed. BUG=25462, 25465 TEST=See bug for test.html. TEST=Run test.html, right-click tab, after close all items should be grayed out. TEST=Run test.html, click tab's close button and hold until tab closes. Should not crash on release. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=30269

Patch Set 1 #

Total comments: 6

Patch Set 2 : Also hit closeButton_. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -0 lines) Patch
M chrome/browser/cocoa/tab_controller.mm View 1 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Scott Hess - ex-Googler
I don't think this is the "right" fix, but I believe it addresses a lot ...
11 years, 1 month ago (2009-10-27 16:42:07 UTC) #1
pink (ping after 24hrs)
http://codereview.chromium.org/335048/diff/1/2 File chrome/browser/cocoa/tab_controller.mm (right): http://codereview.chromium.org/335048/diff/1/2#newcode59 Line 59: for (NSMenuItem* item in [contextMenu_ itemArray]) { how ...
11 years, 1 month ago (2009-10-27 16:59:23 UTC) #2
Scott Hess - ex-Googler
http://codereview.chromium.org/335048/diff/1/2 File chrome/browser/cocoa/tab_controller.mm (right): http://codereview.chromium.org/335048/diff/1/2#newcode59 Line 59: for (NSMenuItem* item in [contextMenu_ itemArray]) { On ...
11 years, 1 month ago (2009-10-27 17:24:15 UTC) #3
viettrungluu
Of course I'd like a general solution, but I'd like to see how this affects ...
11 years, 1 month ago (2009-10-27 17:27:11 UTC) #4
Scott Hess - ex-Googler
BTW, AFAICT there are sort of two ways this kind of thing happens. One is ...
11 years, 1 month ago (2009-10-27 17:31:44 UTC) #5
viettrungluu
So the case I was thinking of (of different behaviour) was dragging a tab that ...
11 years, 1 month ago (2009-10-27 17:34:18 UTC) #6
Mark Mentovai
http://codereview.chromium.org/335048/diff/1/2 File chrome/browser/cocoa/tab_controller.mm (right): http://codereview.chromium.org/335048/diff/1/2#newcode59 Line 59: for (NSMenuItem* item in [contextMenu_ itemArray]) { shess ...
11 years, 1 month ago (2009-10-27 17:38:05 UTC) #7
viettrungluu
http://codereview.chromium.org/335048/diff/1/2 File chrome/browser/cocoa/tab_controller.mm (right): http://codereview.chromium.org/335048/diff/1/2#newcode59 Line 59: for (NSMenuItem* item in [contextMenu_ itemArray]) { On ...
11 years, 1 month ago (2009-10-27 17:56:35 UTC) #8
Scott Hess - ex-Googler
Aha! I found another repro which seems more likely to explain a lot of our ...
11 years, 1 month ago (2009-10-27 18:01:03 UTC) #9
Scott Hess - ex-Googler
On Tue, Oct 27, 2009 at 10:56 AM, <viettrungluu@chromium.org> wrote: > test.html doesn't seem to ...
11 years, 1 month ago (2009-10-27 18:03:56 UTC) #10
Scott Hess - ex-Googler
On 2009/10/27 18:01:03, shess wrote: > Aha! I found another repro which seems more likely ...
11 years, 1 month ago (2009-10-27 18:13:44 UTC) #11
Scott Hess - ex-Googler
On 2009/10/27 18:13:44, shess wrote: > On 2009/10/27 18:01:03, shess wrote: > > Aha! I ...
11 years, 1 month ago (2009-10-27 19:27:35 UTC) #12
pink (ping after 24hrs)
lgtm i still think we should add a TODO that this is a temporary spot-fix ...
11 years, 1 month ago (2009-10-27 22:03:50 UTC) #13
Scott Hess - ex-Googler
11 years, 1 month ago (2009-10-28 16:11:25 UTC) #14
http://crbug.com/25968 : Controls can outlive their targets when
JavaScript closes tabs.

I'll list the cases I've got a repro for there.


On Tue, Oct 27, 2009 at 3:03 PM,  <pinkerton@chromium.org> wrote:
> lgtm
>
> i still think we should add a TODO that this is a temporary spot-fix and
> that
> other context menus and closeboxes in the browser window should be audited
> for a
> more general solution.
>
> http://codereview.chromium.org/335048
>

Powered by Google App Engine
This is Rietveld 408576698