Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cd3ed2f6e666c4dc756bfaf9e8e6d0a011c42829
      
https://github.com/WebKit/WebKit/commit/cd3ed2f6e666c4dc756bfaf9e8e6d0a011c42829
  Author: Razvan Caliman <[email protected]>
  Date:   2026-03-19 (Thu, 19 Mar 2026)

  Changed paths:
    A LayoutTests/inspector/timeline/timeline-recording-autocapture-expected.txt
    A LayoutTests/inspector/timeline/timeline-recording-autocapture.html
    M Source/WebCore/inspector/agents/page/PageTimelineAgent.cpp

  Log Message:
  -----------
  REGRESSION(290430@main): Timelines recording stops on page reload even when 
auto-stop is disabled
https://bugs.webkit.org/show_bug.cgi?id=310137
rdar://169732727

Reviewed by BJ Burg and Devin Rousso.

290430@main split `InspectorTimelineAgent` into `PageTimelineAgent` and
`WorkerTimelineAgent`. When `mainFrameStartedLoading()` was moved to
`PageTimelineAgent`, the `if (m_tracking) return;` guard was dropped.

This guard prevents the backend from dispatching `Timeline.autoCaptureStarted`
to the frontend when a recording is already active. Without it, every page 
reload
or navigation during an active recording causes 
`WI.TimelineManager.prototype.autoCaptureStarted()`
on the frontend to unconditionally stop the current recording and start a new 
one,
regardless of the "Stop recording once page loads" setting.

This patch restores the guard so that 
`PageTimelineAgent::mainFrameStartedLoading()`
is a no-op when instruments are already recording.

Added a test for auto-capture behavior.

* LayoutTests/inspector/timeline/timeline-recording-autocapture-expected.txt: 
Added.
* LayoutTests/inspector/timeline/timeline-recording-autocapture.html: Added.
* Source/WebCore/inspector/agents/page/PageTimelineAgent.cpp:
(WebCore::PageTimelineAgent::mainFrameStartedLoading):

Canonical link: https://commits.webkit.org/309566@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to