Guard against null Browser in PermissionPromptBubbleBaseView [chromium/src : main]

0 views
Skip to first unread message

Jiayu Chen (Gerrit)

unread,
10:21 AM (13 hours ago) 10:21 AM
to Thomas Lukaszewicz, chromium...@chromium.org
Attention needed from Thomas Lukaszewicz

Jiayu Chen added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Jiayu Chen . resolved

Hi, Tom, I found a place where we need to null check the browser in the permission dialog stack, or the browser would crash when clicking allow in the permission dialog. Not sure I'm the right person to bring it to the permission owners though, so ptal. Thx

Open in Gerrit

Related details

Attention is currently required from:
  • Thomas Lukaszewicz
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I04751d325271e9f9c1172d8fe2f45e492bf9f8b0
Gerrit-Change-Number: 7994755
Gerrit-PatchSet: 1
Gerrit-Owner: Jiayu Chen <jiay...@microsoft.com>
Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
Gerrit-Attention: Thomas Lukaszewicz <tl...@chromium.org>
Gerrit-Comment-Date: Wed, 24 Jun 2026 14:21:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Thomas Lukaszewicz (Gerrit)

unread,
7:07 PM (4 hours ago) 7:07 PM
to Jiayu Chen, chromium...@chromium.org
Attention needed from Jiayu Chen

Thomas Lukaszewicz voted and added 1 comment

Votes added by Thomas Lukaszewicz

Commit-Queue+2

1 comment

Patchset-level comments
Thomas Lukaszewicz . resolved

Thanks for the catch - the null-check here is fine to land (owners are aware of our intent and changes and if we need to land fixes like this it's ok)

Open in Gerrit

Related details

Attention is currently required from:
  • Jiayu Chen
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I04751d325271e9f9c1172d8fe2f45e492bf9f8b0
Gerrit-Change-Number: 7994755
Gerrit-PatchSet: 1
Gerrit-Owner: Jiayu Chen <jiay...@microsoft.com>
Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
Gerrit-Attention: Jiayu Chen <jiay...@microsoft.com>
Gerrit-Comment-Date: Wed, 24 Jun 2026 23:07:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Thomas Lukaszewicz (Gerrit)

unread,
7:07 PM (4 hours ago) 7:07 PM
to Jiayu Chen, chromium...@chromium.org
Attention needed from Jiayu Chen

Thomas Lukaszewicz voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Jiayu Chen
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I04751d325271e9f9c1172d8fe2f45e492bf9f8b0
Gerrit-Change-Number: 7994755
Gerrit-PatchSet: 1
Gerrit-Owner: Jiayu Chen <jiay...@microsoft.com>
Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
Gerrit-Attention: Jiayu Chen <jiay...@microsoft.com>
Gerrit-Comment-Date: Wed, 24 Jun 2026 23:07:17 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Jiayu Chen (Gerrit)

unread,
9:23 PM (2 hours ago) 9:23 PM
to Chromium LUCI CQ, Thomas Lukaszewicz, chromium...@chromium.org

Jiayu Chen voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I04751d325271e9f9c1172d8fe2f45e492bf9f8b0
    Gerrit-Change-Number: 7994755
    Gerrit-PatchSet: 2
    Gerrit-Owner: Jiayu Chen <jiay...@microsoft.com>
    Gerrit-Reviewer: Jiayu Chen <jiay...@microsoft.com>
    Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
    Gerrit-Comment-Date: Thu, 25 Jun 2026 01:22:47 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    10:05 PM (1 hour ago) 10:05 PM
    to Jiayu Chen, Thomas Lukaszewicz, chromium...@chromium.org

    Chromium LUCI CQ submitted the change

    Unreviewed changes

    1 is the latest approved patch-set.
    No files were changed between the latest approved patch-set and the submitted one.

    Change information

    Commit message:
    Guard against null Browser in PermissionPromptBubbleBaseView

    PermissionPromptBubbleBaseView::RunButtonCallback() passed the result of
    GetBrowser() straight into BrowserView::GetBrowserViewForBrowser(),
    which dereferences its argument. GetBrowser() returns null for
    permission promptswhose host is not backed by a Browser (for example a
    standalone Document Picture-in-Picture window), so clicking a prompt
    button crashed with a null dereference before the code could reach the
    fallback path that drives the delegate directly.

    Skip the BrowserView lookup when there is no Browser. The existing
    `browser_view &&` guard then bypasses the toolbar-chip path and the
    prompt decision is propagated to the delegate via the direct Accept/Deny
    switch.
    Bug: 515252142
    Change-Id: I04751d325271e9f9c1172d8fe2f45e492bf9f8b0
    Reviewed-by: Thomas Lukaszewicz <tl...@chromium.org>
    Commit-Queue: Jiayu Chen <jiay...@microsoft.com>
    Cr-Commit-Position: refs/heads/main@{#1652124}
    Files:
    • M chrome/browser/ui/views/permissions/permission_prompt_bubble_base_view.cc
    Change size: XS
    Delta: 1 file changed, 5 insertions(+), 1 deletion(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Thomas Lukaszewicz
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I04751d325271e9f9c1172d8fe2f45e492bf9f8b0
    Gerrit-Change-Number: 7994755
    Gerrit-PatchSet: 3
    Gerrit-Owner: Jiayu Chen <jiay...@microsoft.com>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Jiayu Chen <jiay...@microsoft.com>
    Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages