Files
Claudio DeSouza 645d1b92c1 [cr149][WIP] ReadingListPageHandler has WebContentsObserver
The brave version of this class was using this observer, but now that
base class has introduced it, we can just rely on that.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/68cc838450946381bec6c1c777ede5494715f608

commit 68cc838450946381bec6c1c777ede5494715f608
Author: Foromo Daniel Soromou <koretadaniel@chromium.org>
Date:   Tue Apr 21 08:04:31 2026 -0700

    [Side Panel] Fix dangling WebContents pointer in ReadingListPageHandler

    This patch resolves a dangling pointer issue in ReadingListPageHandler
    by replacing the `DanglingUntriaged` raw pointer to
    `content::WebContents` with a `base::WeakPtr<content::WebContents>`.

    Because `WebContents` can be destroyed before the
    `ReadingListPageHandler` (e.g., during teardown), accessing the dangling
    raw pointer could lead to Use-After-Free (UAF) bugs . Null checks have
    been added to safely return early in cases where `web_contents_` has
    already been invalidated.

    Bug: 490505884
    Change-Id: I411121440d26ee770a775eda6d564ea56a385dbf
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7775987
    Reviewed-by: Eshwar Stalin <estalin@chromium.org>
    Commit-Queue: Foromo Daniel Soromou <koretadaniel@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1618202}
2026-05-22 16:25:06 -04:00
..