Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 98f9f65893366f159adec513808b596ab972a7dd
      
https://github.com/WebKit/WebKit/commit/98f9f65893366f159adec513808b596ab972a7dd
  Author: Devin Rousso <[email protected]>
  Date:   2025-05-20 (Tue, 20 May 2025)

  Changed paths:
    A LayoutTests/inspector/worker/resources/worker-timeline.js
    A LayoutTests/inspector/worker/timeline-line-column-expected.txt
    A LayoutTests/inspector/worker/timeline-line-column.html
    M Source/WebCore/inspector/InspectorInstrumentation.h
    M Source/WebCore/workers/WorkerConsoleClient.cpp
    M Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js
    M Source/WebInspectorUI/UserInterface/Models/Instrument.js
    M Source/WebInspectorUI/UserInterface/Models/ScriptInstrument.js
    M Source/WebInspectorUI/UserInterface/Test/InspectorProtocol.js

  Log Message:
  -----------
  Web Inspector: support `console.profile` in `Worker`
https://bugs.webkit.org/show_bug.cgi?id=287069

Reviewed by BJ Burg.

* Source/WebCore/workers/WorkerConsoleClient.cpp:
(WebCore::WorkerConsoleClient::profile):
(WebCore::WorkerConsoleClient::profileEnd):
(WebCore::WorkerConsoleClient::takeHeapSnapshot):
(WebCore::WorkerConsoleClient::timeStamp):
* Source/WebCore/inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::takeHeapSnapshot):
(WebCore::InspectorInstrumentation::consoleTimeStamp):
(WebCore::InspectorInstrumentation::startProfiling):
(WebCore::InspectorInstrumentation::stopProfiling):
Create new `InspectorInstrumentation` hooks for `WorkerGlobalScope` that mimic 
the behavior of the respective `Page` flow.

* LayoutTests/inspector/worker/resources/worker-timeline.js: Added.
* LayoutTests/inspector/worker/timeline-line-column.html: Added.
* LayoutTests/inspector/worker/timeline-line-column-expected.txt: Added.
Add some basic tests to ensure that `Timeline` works in a `Worker`.

* Source/WebInspectorUI/UserInterface/Test/InspectorProtocol.js:
(InspectorProtocol.getNextMessageId): Added.
(InspectorProtocol.sendCommand):
(InspectorProtocol.awaitCommand):
(InspectorProtocol.awaitMessage):
Expose the message ID for callers to craft their own properly formatted 
protocol messages.

* Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager.prototype.initializeTarget):
(WI.TimelineManager.prototype.disable):
(WI.TimelineManager.prototype._updateAutoCaptureInstruments):
* Source/WebInspectorUI/UserInterface/Models/Instrument.js:
(WI.Instrument.startLegacyTimelineAgent):
(WI.Instrument.stopLegacyTimelineAgent):
* Source/WebInspectorUI/UserInterface/Models/ScriptInstrument.js:
(WI.ScriptInstrument.prototype.startInstrumentation):
(WI.ScriptInstrument.prototype.stopInstrumentation):

Drive-by: add missing compatibility comments.
Canonical link: https://commits.webkit.org/295189@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to