Files
electron/shell/browser
trop[bot] 6fd63cdba8 fix: prevent crash when calling contentTracing APIs before app is ready (#51352)
* fix: prevent crash when calling contentTracing APIs before app is ready

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>

* chore: fix linter error in `spec/fixtures/crash-cases/content-tracing-before-ready/` (#51356)

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

introduced earlier today in 6f2e5cd4

* chore: make linter happy

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: om-ghante <mr.omghante1@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2026-04-28 11:08:11 -05:00
..