Skip to content

fix: dangling rawptr NativeWindow::primary_web_contents_view_ - #52939

Merged
MarshallOfSound merged 1 commit into
43-x-yfrom
manual-bp/43-x-y/52546
Aug 18, 2026
Merged

MarshallOfSound merged 1 commit into
43-x-yfrom
manual-bp/43-x-y/52546

Conversation

@VerteDinde

Copy link
Copy Markdown
Member

Backport of #52546

See that PR for details.

Manual backport notes: the only conflict was in native_window.h, where main has the #51510 window-state members adjacent to primary_web_contents_view_; resolved to just the views::ViewTracker change so this stays independent of the #51510 backport (whichever lands second needs a trivial rebase).

Notes: none.

* fix: track the primary web contents view

NativeWindow does not own the BrowserWindow's inspectable view, so its raw pointer could outlive the view during WebContents teardown. Track the Views lifetime instead of requiring each destruction path to clear the pointer.

* fixup! fix: track the primary web contents view

refactor: remove NativeWindow::primary_web_contents_view_initialized_
(cherry picked from commit bbb00d1)
@VerteDinde VerteDinde added backport This is a backport PR semver/patch backwards-compatible bug fixes 43-x-y labels Aug 18, 2026
@MarshallOfSound
MarshallOfSound enabled auto-merge (squash) August 18, 2026 09:16
@MarshallOfSound
MarshallOfSound merged commit 524a3df into 43-x-y Aug 18, 2026
94 checks passed
@MarshallOfSound
MarshallOfSound deleted the manual-bp/43-x-y/52546 branch August 18, 2026 09:16
@release-clerk

release-clerk Bot commented Aug 18, 2026

Copy link
Copy Markdown

No Release Notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

43-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants