Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 976a482b7df608fb8de1dd0a8192088ef1deb082
      
https://github.com/WebKit/WebKit/commit/976a482b7df608fb8de1dd0a8192088ef1deb082
  Author: Devin Rousso <[email protected]>
  Date:   2025-02-04 (Tue, 04 Feb 2025)

  Changed paths:
    M Source/JavaScriptCore/inspector/protocol/ScriptProfiler.json
    M Source/WebCore/inspector/WorkerInspectorController.cpp
    M Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
    M Source/WebInspectorUI/UserInterface/Base/Setting.js
    M Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js
    M Source/WebInspectorUI/UserInterface/Models/ScriptInstrument.js
    M Source/WebInspectorUI/UserInterface/Protocol/ScriptProfilerObserver.js
    M Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js

  Log Message:
  -----------
  Web Inspector: support `ScriptProfiler` inside `Worker`
https://bugs.webkit.org/show_bug.cgi?id=286656

Reviewed by BJ Burg.

This allows for the JSC sampling profiler to work inside `Worker` contexts 
(since they have a separate `VM`).

Note that there is still a lot missing from full support as the Timelines Tab 
wraps samples in other top-level events (e.g. the `WI.SourceCodeLocation` is 
derived from `Timeline.EventType.EvaluateScript`).

* Source/JavaScriptCore/inspector/protocol/ScriptProfiler.json:
* Source/WebCore/inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::createLazyAgents):

* Source/WebInspectorUI/UserInterface/Models/ScriptInstrument.js:
(WI.ScriptInstrument.prototype.startInstrumentation):
(WI.ScriptInstrument.prototype.stopInstrumentation):
Start and stop the `ScriptProfiler` for each `WI.Target` instead of just the 
main target.

* Source/WebInspectorUI/UserInterface/Protocol/ScriptProfilerObserver.js:
(WI.ScriptProfilerObserver.prototype.trackingStart):
(WI.ScriptProfilerObserver.prototype.trackingUpdate):
(WI.ScriptProfilerObserver.prototype.trackingComplete):
Pass along the `WI.Target` when handling events.

* Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager):
(WI.TimelineManager.prototype.scriptProfilerIsTracking):
(WI.TimelineManager.prototype.scriptProfilerTrackingStarted):
(WI.TimelineManager.prototype.scriptProfilerTrackingUpdated):
(WI.TimelineManager.prototype.scriptProfilerTrackingCompleted):
Store `WI.ScriptTimelineRecord` in a separate list for each `WI.Target` instead 
of in one global list.

* Source/WebInspectorUI/UserInterface/Base/Setting.js:
* Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
* Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js:
Add an experimental setting for this change since it's not fully done yet.

Canonical link: https://commits.webkit.org/289840@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