You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(inspector): make the Tracing domain protocol-correct and faster
Ports the iOS tracing agent and takes it further where android's
inspector allows.
- emit pre-serialized Tracing.dataCollected messages straight from the
trace writer, 1000 events per message, replacing the JS snippet that
was compiled and run inside the isolate to JSON.parse the whole trace
and re-slice it into 20-event chunks
- handle the Tracing domain in handleMessageOnSocketThread, so starting
a trace and flushing it to the frontend never queues behind the main
thread or takes the Locker
- answer with real CDP responses instead of echoing the request, always
send Tracing.tracingComplete so an empty trace no longer hangs
DevTools, and report dataLossOccurred from a ring-wrap heuristic
- honor traceConfig.includedCategories and traceBufferSizeInKb, the
latter clamped to [2, 16384] ring chunks in double space
- enforce single process-wide trace ownership (the TracingController is
process-global): a concurrent Tracing.start and a Tracing.end from a
non-owner get CDP errors, and disconnect drops an orphaned trace
- skip the source map rewrite's full-message scan and copy when sending
trace chunks
Also fixes a use-after-free that the previous teardown always hit:
TracingController::Initialize() swaps trace_buffer_ with no lock and
UpdateTraceEventDuration() dereferences it with neither a lock nor a
null check, so clearing the buffer at StopTracing faulted every
TRACE_EVENT scope still open. The controller now gets an NSTraceBuffer
indirection installed once and never replaced; the ring inside it is
swapped under its own lock and freed as soon as the trace ends.
0 commit comments