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

Issue 5733002: Preventive fix for focus shifting behaviour in extension popup views (Closed)

Created:
10 years ago by Jeff Timanus
Modified:
9 years, 6 months ago
Reviewers:
joi
CC:
chromium-reviews, Aaron Boodman, Erik does not do reviews, pam+watch_chromium.org, ben+cc_chromium.org
Visibility:
Public.

Description

Simple fix preventing a potential crash location when shifting focus from an experimental extension popup view. BUG=66145 TEST=ExtensionApiTest.Popup

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -0 lines) Patch
M chrome/browser/extensions/extension_popup_api.cc View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Jeff Timanus
Joi, This is a fix that will prevent the symptom of the issue we discussed ...
10 years ago (2010-12-09 23:57:23 UTC) #1
joi
10 years ago (2010-12-10 01:49:17 UTC) #2
LGTM

Please create a crbug for the issue, and associate this review with
it. I think we'll want to try to get this merged to M9 if possible, so
we'll need a bug.

Cheers,
Jói



On Thu, Dec 9, 2010 at 6:57 PM,  <twiz@chromium.org> wrote:
> Reviewers: joi,
>
> Message:
> Joi,
>
> This is a fix that will prevent the symptom of the issue we discussed
> earlier
> today.  This is a fix that will stop the symptom.
>
> Jeff
>
>
> Description:
> Simple fix preventing a potential crash location when shifting focus from an
> experimental extension popup view.
>
> BUG=NONE
> TEST=ExtensionApiTest.Popup
>
>
> Please review this at http://codereview.chromium.org/5733002/
>
> SVN Base: svn://svn.chromium.org/chrome/trunk/src/
>
> Affected files:
>  M     chrome/browser/extensions/extension_popup_api.cc
>
>
> Index: chrome/browser/extensions/extension_popup_api.cc
> ===================================================================
> --- chrome/browser/extensions/extension_popup_api.cc    (revision 68649)
> +++ chrome/browser/extensions/extension_popup_api.cc    (working copy)
> @@ -242,6 +242,12 @@
>     // If no view is to be focused, then Chrome was deactivated, so hide the
>     // popup.
>     if (focused_now) {
> +      // On XP, the focus change handler may be invoked when the delegate
> has
> +      // already been revoked.
> +      // TODO(twiz@chromium.org):  Resolve the trigger of this behaviour.
> +      if (!dispatcher_ || !dispatcher_->delegate())
> +        return;
> +
>       gfx::NativeView host_view =
>           dispatcher_->delegate()->GetNativeViewOfHost();
>
>
>
>

Powered by Google App Engine
This is Rietveld 408576698