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

Issue 7232028: Fixes crash when closing tab then quickly right clicking. The problem (Closed)

Created:
9 years, 5 months ago by sky
Modified:
9 years, 5 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Fixes crash when closing tab then quickly right clicking. The problem is we attempt to show a content menu for a TabContents that is no longer in the model. BUG=86713 TEST=see bug R=ben@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=91357

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M chrome/browser/ui/views/tabs/base_tab.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 2 (0 generated)
sky
9 years, 5 months ago (2011-07-01 17:42:27 UTC) #1
Ben Goodger (Google)
9 years, 5 months ago (2011-07-01 17:47:26 UTC) #2
LGTM

On Fri, Jul 1, 2011 at 10:42 AM, <sky@chromium.org> wrote:

> Reviewers: Ben Goodger (Google),
>
> Description:
> Fixes crash when closing tab then quickly right clicking. The problem
> is we attempt to show a content menu for a TabContents that is no
> longer in the model.
>
> BUG=86713
> TEST=see bug
> R=ben@chromium.org
>
>
> Please review this at
http://codereview.chromium.**org/7232028/<http://codereview.chromium.org/7232...
>
> SVN Base:
svn://svn.chromium.org/chrome/**trunk/src<http://svn.chromium.org/chrome/trunk/src>
>
> Affected files:
>  M chrome/browser/ui/views/tabs/**base_tab.cc
>
>
> Index: chrome/browser/ui/views/tabs/**base_tab.cc
> diff --git a/chrome/browser/ui/views/**tabs/base_tab.cc
> b/chrome/browser/ui/views/**tabs/base_tab.cc
> index af5e41e652b6866de1ffac36412937**a200a4a252..**
> 44c136484c669d4e533e0e9836423b**0f50ab0986 100644
> --- a/chrome/browser/ui/views/**tabs/base_tab.cc
> +++ b/chrome/browser/ui/views/**tabs/base_tab.cc
> @@ -513,7 +513,7 @@ void BaseTab::ButtonPressed(views::**Button* sender,
> const views::Event& event) {
>  void BaseTab::**ShowContextMenuForView(views::**View* source,
>                                      const gfx::Point& p,
>                                      bool is_mouse_gesture) {
> -  if (controller())
> +  if (controller() && !closing())
>     controller()->**ShowContextMenuForTab(this, p);
>  }
>
>
>
>

Powered by Google App Engine
This is Rietveld 408576698