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