New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 706489 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug



Sign in to add a comment

Possible null dereference of C++ variable?

Project Member Reported by shrike@chromium.org, Mar 29 2017

Issue description

I was looking through the code trying to see what might be going on in the crash in Issue 675854, and noticed that in permission_bubble_controller.mm, -showWindow: says the following:

  if ([self hasVisibleLocationBar]) {
    decoration_ = [[self.parentWindow windowController] locationBarBridge]
                      ->GetPageInfoDecoration();
    decoration_->SetActive(true);
  }

There will be a crash if [[self.parentWindow windowController] locationBarBridge] returns nullptr, and as far as I can tell [self hasVisibleLocationBar] doesn't guarantee anything about what -locationBarBridge will return.

 
Status: Started (was: Assigned)
Project Member

Comment 2 by bugdroid1@chromium.org, Mar 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2b0f410e97c2f08f08f3e162bc995c7c4c237970

commit 2b0f410e97c2f08f08f3e162bc995c7c4c237970
Author: spqchan <spqchan@chromium.org>
Date: Fri Mar 31 00:19:38 2017

[Mac] Fix a potential crash in the permission bubble controller

BUG= 706489 

Review-Url: https://codereview.chromium.org/2786943003
Cr-Commit-Position: refs/heads/master@{#460948}

[modify] https://crrev.com/2b0f410e97c2f08f08f3e162bc995c7c4c237970/chrome/browser/ui/cocoa/permission_bubble/permission_bubble_controller.mm

Status: Fixed (was: Started)

Sign in to add a comment