Skip to content

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

Merged
ckerr merged 2 commits into42-x-yfrom
trop/42-x-y-bp-fix-prevent-crash-when-calling-contenttracing-apis-before-app-is-ready-1777322685868
Apr 28, 2026
Merged

fix: prevent crash when calling contentTracing APIs before app is ready#51353
ckerr merged 2 commits into42-x-yfrom
trop/42-x-y-bp-fix-prevent-crash-when-calling-contenttracing-apis-before-app-is-ready-1777322685868

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 42-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Apr 27, 2026
@ckerr ckerr merged commit 04daf94 into 42-x-y Apr 28, 2026
65 checks passed
@ckerr ckerr deleted the trop/42-x-y-bp-fix-prevent-crash-when-calling-contenttracing-apis-before-app-is-ready-1777322685868 branch April 28, 2026 01:18
@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.

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

Labels

42-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