Skip to content

fix: prevent crash when calling contentTracing APIs before app is ready#51352

Merged
ckerr merged 3 commits into41-x-yfrom
trop/41-x-y-bp-fix-prevent-crash-when-calling-contenttracing-apis-before-app-is-ready-1777322685292
Apr 28, 2026
Merged

fix: prevent crash when calling contentTracing APIs before app is ready#51352
ckerr merged 3 commits into41-x-yfrom
trop/41-x-y-bp-fix-prevent-crash-when-calling-contenttracing-apis-before-app-is-ready-1777322685292

Conversation

@trop
Copy link
Copy Markdown
Contributor

@trop trop Bot commented Apr 27, 2026

Backport of #50920

See that PR for details.

Notes: Fixed an issue where calling contentTracing APIs before app.whenReady() would crash the application.

Added Browser::Get()->is_ready() guards to all contentTracing API functions (startRecording, stopRecording, getCategories, getTraceBufferUsage) so they reject their returned Promises with a clear error message instead of crashing when called before app.whenReady().

Added a crash-case fixture test that validates all four APIs reject properly before readiness and work normally after.

Co-authored-by: om-ghante <mr.omghante1@gmail.com>
@trop trop Bot added 41-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Apr 27, 2026
ckerr added 2 commits April 27, 2026 23:25
…-before-ready/` (#51356)

chore: fix linter error in spec/fixtures/crash-cases/content-tracing-before-ready/

introduced earlier today in 6f2e5cd
@ckerr ckerr merged commit 6fd63cd into 41-x-y Apr 28, 2026
113 of 114 checks passed
@release-clerk
Copy link
Copy Markdown

release-clerk Bot commented Apr 28, 2026

Release Notes Persisted

Fixed an issue where calling contentTracing APIs before app.whenReady() would crash the application.

@ckerr ckerr deleted the trop/41-x-y-bp-fix-prevent-crash-when-calling-contenttracing-apis-before-app-is-ready-1777322685292 branch April 28, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant