Skip to content

Commit

Permalink
Simple fix preventing a potential crash location when shifting focus …
Browse files Browse the repository at this point in the history
…from an experimental extension popup view.

BUG=NONE
TEST=ExtensionApiTest.Popup

Review URL: http://codereview.chromium.org/5733002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68814 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
twiz@google.com committed Dec 10, 2010
1 parent 094c3e8 commit 9f0e88f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions chrome/browser/extensions/extension_popup_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,12 @@ class ExtensionPopupHost : public ExtensionPopup::Observer,
// 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();

Expand Down

0 comments on commit 9f0e88f

Please sign in to comment.