chrome-devtools-frontend 1.0.1657110 → 1.0.1660788

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. package/.agents/skills/devtools-ux-writing-refactor/SKILL.md +125 -0
  2. package/.agents/skills/migrate-chromium-test/SKILL.md +15 -70
  3. package/.agents/skills/repro-flaky-tests/SKILL.md +53 -0
  4. package/.agents/skills/ui-eng-vision-orchestrator/SKILL.md +37 -18
  5. package/.agents/skills/version-control/SKILL.md +8 -1
  6. package/AUTHORS +1 -0
  7. package/SECURITY.md +3 -0
  8. package/docs/get_the_code.md +6 -0
  9. package/front_end/Images/src/ads.svg +1 -0
  10. package/front_end/Tests.js +6 -6
  11. package/front_end/core/common/Gzip.ts +12 -5
  12. package/front_end/core/common/ResourceType.ts +19 -19
  13. package/front_end/core/common/Revealer.ts +15 -15
  14. package/front_end/core/common/SettingRegistration.ts +19 -19
  15. package/front_end/core/host/AidaClient.ts +35 -9
  16. package/front_end/core/host/GdpClient.ts +10 -7
  17. package/front_end/core/platform/StringUtilities.ts +35 -0
  18. package/front_end/core/sdk/AccessibilityModel.snapshot.txt +17 -0
  19. package/front_end/core/sdk/AccessibilityModel.ts +132 -2
  20. package/front_end/core/sdk/CPUThrottlingManager.ts +8 -5
  21. package/front_end/core/sdk/CSSMetadata.ts +110 -16
  22. package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +2 -5
  23. package/front_end/core/sdk/ConsoleModel.ts +5 -5
  24. package/front_end/core/sdk/DOMDebuggerModel.ts +5 -1
  25. package/front_end/core/sdk/DOMModel.ts +32 -18
  26. package/front_end/core/sdk/NetworkManager.ts +58 -14
  27. package/front_end/core/sdk/NetworkRequest.ts +37 -1
  28. package/front_end/core/sdk/OverlayModel.ts +45 -6
  29. package/front_end/core/sdk/ResourceTreeModel.ts +6 -7
  30. package/front_end/core/sdk/ScreenCaptureModel.ts +2 -2
  31. package/front_end/core/sdk/ServerTiming.ts +17 -13
  32. package/front_end/core/sdk/ServiceWorkerCacheModel.ts +4 -2
  33. package/front_end/core/sdk/ServiceWorkerManager.ts +19 -5
  34. package/front_end/core/sdk/TargetManager.ts +10 -1
  35. package/front_end/core/sdk/TraceObject.ts +4 -2
  36. package/front_end/core/sdk/sdk-meta.ts +170 -0
  37. package/front_end/design_system_tokens.css +0 -5
  38. package/front_end/entrypoints/devtools_app/devtools_app.ts +1 -1
  39. package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +13 -4
  40. package/front_end/entrypoints/formatter_worker/FormattedContentBuilder.ts +5 -2
  41. package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +23 -4
  42. package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +33 -10
  43. package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +8 -3
  44. package/front_end/entrypoints/inspector_main/InspectorMain.ts +4 -4
  45. package/front_end/entrypoints/inspector_main/OutermostTargetSelector.ts +2 -2
  46. package/front_end/entrypoints/inspector_main/RenderingOptions.ts +36 -37
  47. package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +15 -33
  48. package/front_end/entrypoints/js_app/js_app.ts +6 -5
  49. package/front_end/entrypoints/main/GlobalAiButton.ts +4 -4
  50. package/front_end/entrypoints/main/MainImpl.ts +25 -55
  51. package/front_end/entrypoints/main/main-meta.ts +50 -50
  52. package/front_end/entrypoints/node_app/app/NodeConnectionsPanel.ts +5 -5
  53. package/front_end/entrypoints/node_app/app/NodeMain.ts +3 -3
  54. package/front_end/entrypoints/node_app/node_app.ts +10 -9
  55. package/front_end/entrypoints/worker_app/WorkerMain.ts +1 -1
  56. package/front_end/foundation/Universe.ts +76 -6
  57. package/front_end/generated/InspectorBackendCommands.ts +3 -3
  58. package/front_end/generated/SupportedCSSProperties.js +19 -12
  59. package/front_end/generated/protocol.ts +7 -1
  60. package/front_end/models/ai_assistance/AiConversation.ts +19 -17
  61. package/front_end/models/ai_assistance/AiHistoryStorage.ts +37 -14
  62. package/front_end/models/ai_assistance/AiUtils.ts +38 -42
  63. package/front_end/models/ai_assistance/agents/AiAgent.ts +5 -1
  64. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +3 -2
  65. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +2 -1
  66. package/front_end/models/ai_assistance/agents/StorageAgent.ts +7 -5
  67. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +270 -286
  68. package/front_end/models/ai_assistance/data_formatters/UnitFormatters.ts +20 -0
  69. package/front_end/models/ai_assistance/performance/AICallTree.ts +3 -1
  70. package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +3 -2
  71. package/front_end/models/autofill_manager/AutofillManager.ts +3 -1
  72. package/front_end/models/bindings/CSSWorkspaceBinding.ts +8 -5
  73. package/front_end/models/bindings/CompilerScriptMapping.ts +2 -1
  74. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +15 -16
  75. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +6 -4
  76. package/front_end/models/bindings/FileUtils.ts +11 -12
  77. package/front_end/models/bindings/NetworkProject.ts +4 -0
  78. package/front_end/models/bindings/PresentationConsoleMessageHelper.ts +2 -1
  79. package/front_end/models/bindings/ResourceUtils.ts +1 -1
  80. package/front_end/models/bindings/SASSSourceMapping.ts +8 -5
  81. package/front_end/models/emulation/DeviceModeModel.ts +14 -14
  82. package/front_end/models/emulation/EmulatedDevices.ts +392 -11
  83. package/front_end/models/extensions/ExtensionAPI.ts +6 -6
  84. package/front_end/models/extensions/LanguageExtensionEndpoint.ts +13 -12
  85. package/front_end/models/issues_manager/BounceTrackingIssue.ts +1 -1
  86. package/front_end/models/issues_manager/ClientHintIssue.ts +1 -1
  87. package/front_end/models/issues_manager/ConnectionAllowlistIssue.ts +1 -1
  88. package/front_end/models/issues_manager/ContentSecurityPolicyIssue.ts +7 -7
  89. package/front_end/models/issues_manager/CookieDeprecationMetadataIssue.ts +2 -2
  90. package/front_end/models/issues_manager/CookieIssue.ts +6 -7
  91. package/front_end/models/issues_manager/CorsIssue.ts +3 -3
  92. package/front_end/models/issues_manager/CrossOriginEmbedderPolicyIssue.ts +2 -2
  93. package/front_end/models/issues_manager/DeprecationIssue.ts +3 -3
  94. package/front_end/models/issues_manager/EmailVerificationRequestIssue.ts +1 -1
  95. package/front_end/models/issues_manager/FederatedAuthRequestIssue.ts +1 -1
  96. package/front_end/models/issues_manager/FederatedAuthUserInfoRequestIssue.ts +1 -1
  97. package/front_end/models/issues_manager/GenericIssue.ts +7 -7
  98. package/front_end/models/issues_manager/HeavyAdIssue.ts +3 -3
  99. package/front_end/models/issues_manager/Issue.ts +8 -8
  100. package/front_end/models/issues_manager/MixedContentIssue.ts +1 -1
  101. package/front_end/models/issues_manager/PartitioningBlobURLIssue.ts +3 -3
  102. package/front_end/models/issues_manager/QuirksModeIssue.ts +1 -1
  103. package/front_end/models/issues_manager/SRIMessageSignatureIssue.ts +2 -2
  104. package/front_end/models/issues_manager/SelectivePermissionsInterventionIssue.ts +2 -2
  105. package/front_end/models/issues_manager/SharedArrayBufferIssue.ts +2 -2
  106. package/front_end/models/issues_manager/SharedDictionaryIssue.ts +1 -1
  107. package/front_end/models/issues_manager/UnencodedDigestIssue.ts +3 -3
  108. package/front_end/models/javascript_metadata/NativeFunctions.js +5 -1
  109. package/front_end/models/stack_trace/StackTraceModel.ts +3 -3
  110. package/front_end/models/text_utils/ContentData.ts +27 -0
  111. package/front_end/models/trace/helpers/SamplesIntegrator.ts +21 -5
  112. package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +29 -14
  113. package/front_end/models/web_mcp/WebMCPModel.ts +24 -6
  114. package/front_end/models/workspace/IgnoreListManager.ts +6 -6
  115. package/front_end/models/workspace/UISourceCode.ts +3 -3
  116. package/front_end/models/workspace_diff/WorkspaceDiff.ts +23 -12
  117. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +25 -22
  118. package/front_end/panels/ai_assistance/ExportConversation.ts +3 -4
  119. package/front_end/panels/ai_assistance/ai_assistance-meta.ts +3 -3
  120. package/front_end/panels/ai_assistance/components/ChatInput.ts +2 -2
  121. package/front_end/panels/ai_assistance/components/ChatMessage.ts +7 -0
  122. package/front_end/panels/ai_assistance/components/DisabledWidget.ts +2 -2
  123. package/front_end/panels/animation/AnimationTimeline.ts +17 -19
  124. package/front_end/panels/animation/AnimationUI.ts +5 -5
  125. package/front_end/panels/animation/animation-meta.ts +2 -2
  126. package/front_end/panels/application/ApplicationPanelSidebar.ts +13 -4
  127. package/front_end/panels/application/BackgroundServiceView.ts +2 -1
  128. package/front_end/panels/application/DeviceBoundSessionsView.ts +2 -6
  129. package/front_end/panels/application/IndexedDBViews.ts +245 -262
  130. package/front_end/panels/application/OpenedWindowDetailsView.ts +1 -1
  131. package/front_end/panels/application/ResourcesPanel.ts +9 -2
  132. package/front_end/panels/application/ServiceWorkersView.ts +252 -211
  133. package/front_end/panels/application/StorageView.ts +97 -33
  134. package/front_end/panels/application/WebMCPView.ts +15 -1
  135. package/front_end/panels/application/components/AdsView.ts +1 -1
  136. package/front_end/panels/application/indexedDBViews.css +38 -9
  137. package/front_end/panels/application/preloading/helper/PreloadingForward.ts +2 -1
  138. package/front_end/panels/application/resourcesSidebar.css +5 -0
  139. package/front_end/panels/application/storageView.css +26 -9
  140. package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +5 -1
  141. package/front_end/panels/browser_debugger/browser_debugger-meta.ts +8 -6
  142. package/front_end/panels/common/DOMLinkifier.ts +1 -1
  143. package/front_end/panels/common/ExtensionServer.ts +119 -14
  144. package/front_end/panels/console/ConsoleContextSelector.ts +4 -4
  145. package/front_end/panels/console/ConsolePinPane.ts +12 -12
  146. package/front_end/panels/console/ConsolePrompt.ts +6 -6
  147. package/front_end/panels/console/ConsoleSidebar.ts +7 -7
  148. package/front_end/panels/console/ConsoleView.ts +45 -44
  149. package/front_end/panels/console/ConsoleViewMessage.ts +40 -40
  150. package/front_end/panels/console/SymbolizedErrorWidget.ts +2 -1
  151. package/front_end/panels/console/console-meta.ts +34 -34
  152. package/front_end/panels/console_counters/WarningErrorCounter.ts +2 -2
  153. package/front_end/panels/coverage/CoverageListView.ts +28 -28
  154. package/front_end/panels/coverage/CoverageModel.ts +2 -1
  155. package/front_end/panels/coverage/CoverageView.ts +23 -23
  156. package/front_end/panels/coverage/coverage-meta.ts +5 -5
  157. package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +36 -36
  158. package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +1 -1
  159. package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +2 -2
  160. package/front_end/panels/css_overview/CSSOverviewStartView.ts +6 -6
  161. package/front_end/panels/css_overview/CSSOverviewUnusedDeclarations.ts +6 -6
  162. package/front_end/panels/css_overview/css_overview-meta.ts +2 -2
  163. package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +20 -21
  164. package/front_end/panels/developer_resources/DeveloperResourcesView.ts +6 -8
  165. package/front_end/panels/developer_resources/developer_resources-meta.ts +2 -2
  166. package/front_end/panels/elements/AccessibilityTreeUtils.ts +8 -102
  167. package/front_end/panels/elements/AccessibilityTreeView.ts +163 -70
  168. package/front_end/panels/elements/ElementsPanel.ts +17 -11
  169. package/front_end/panels/elements/ElementsTreeElement.ts +49 -2
  170. package/front_end/panels/elements/ElementsTreeOutline.ts +4 -4
  171. package/front_end/panels/elements/LayoutPane.ts +1 -1
  172. package/front_end/panels/elements/MetricsSidebarPane.ts +100 -34
  173. package/front_end/panels/elements/StylePropertiesSection.ts +2 -2
  174. package/front_end/panels/elements/StylePropertyTreeElement.ts +8 -2
  175. package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
  176. package/front_end/panels/elements/components/AccessibilityTreeNode.ts +7 -18
  177. package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +2 -2
  178. package/front_end/panels/elements/components/QueryContainer.ts +1 -1
  179. package/front_end/panels/issues/AffectedDirectivesView.ts +1 -1
  180. package/front_end/panels/issues/AffectedResourcesView.ts +2 -1
  181. package/front_end/panels/layer_viewer/LayerViewHost.ts +1 -1
  182. package/front_end/panels/media/EventDisplayTable.ts +2 -2
  183. package/front_end/panels/media/EventTimelineView.ts +4 -4
  184. package/front_end/panels/media/MainView.ts +4 -4
  185. package/front_end/panels/media/PlayerDetailView.ts +5 -5
  186. package/front_end/panels/media/PlayerListView.ts +1 -1
  187. package/front_end/panels/media/PlayerMessagesView.ts +12 -12
  188. package/front_end/panels/media/PlayerPropertiesView.ts +17 -17
  189. package/front_end/panels/network/NetworkDataGridNode.ts +124 -36
  190. package/front_end/panels/network/NetworkLogView.ts +11 -2
  191. package/front_end/panels/network/NetworkLogViewColumns.ts +18 -0
  192. package/front_end/panels/network/NetworkPanel.ts +2 -1
  193. package/front_end/panels/network/NetworkWaterfallColumn.ts +1 -3
  194. package/front_end/panels/network/RequestConditionsDrawer.ts +2 -2
  195. package/front_end/panels/network/RequestPayloadView.ts +53 -7
  196. package/front_end/panels/network/RequestPreviewView.ts +7 -1
  197. package/front_end/panels/network/components/ResponseHeaderSection.ts +1 -1
  198. package/front_end/panels/network/forward/UIFilter.ts +1 -0
  199. package/front_end/panels/network/networkPanel.css +1 -0
  200. package/front_end/panels/network/networkTimingTable.css +1 -1
  201. package/front_end/panels/network/requestPayloadView.css +10 -0
  202. package/front_end/panels/performance_monitor/PerformanceMonitor.ts +12 -12
  203. package/front_end/panels/performance_monitor/performance_monitor-meta.ts +7 -7
  204. package/front_end/panels/profiler/HeapDetachedElementsView.ts +2 -2
  205. package/front_end/panels/profiler/HeapProfileView.ts +563 -51
  206. package/front_end/panels/profiler/HeapSnapshotView.ts +15 -9
  207. package/front_end/panels/profiler/ProfilesPanel.ts +13 -7
  208. package/front_end/panels/profiler/WritableProfileHeader.ts +152 -0
  209. package/front_end/panels/profiler/profiler.ts +2 -2
  210. package/front_end/panels/protocol_monitor/JSONEditor.ts +10 -10
  211. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +28 -32
  212. package/front_end/panels/protocol_monitor/protocol_monitor-meta.ts +1 -1
  213. package/front_end/panels/recorder/RecorderController.ts +15 -15
  214. package/front_end/panels/recorder/RecorderEvents.ts +8 -0
  215. package/front_end/panels/recorder/components/CreateRecordingView.ts +11 -11
  216. package/front_end/panels/recorder/components/ExtensionView.ts +74 -83
  217. package/front_end/panels/recorder/components/RecordingListView.ts +3 -3
  218. package/front_end/panels/recorder/components/RecordingView.ts +13 -10
  219. package/front_end/panels/recorder/components/ReplaySection.ts +9 -9
  220. package/front_end/panels/recorder/components/StepEditor.ts +352 -321
  221. package/front_end/panels/recorder/components/StepView.ts +36 -37
  222. package/front_end/panels/recorder/components/recordingView.css +1 -1
  223. package/front_end/panels/recorder/models/RecorderSettings.ts +2 -2
  224. package/front_end/panels/recorder/recorder-meta.ts +7 -7
  225. package/front_end/panels/screencast/ScreencastApp.ts +1 -1
  226. package/front_end/panels/screencast/ScreencastView.ts +12 -12
  227. package/front_end/panels/search/SearchResultsPane.ts +4 -4
  228. package/front_end/panels/search/SearchView.ts +20 -20
  229. package/front_end/panels/security/SecurityModel.ts +7 -7
  230. package/front_end/panels/security/SecurityPanel.ts +99 -107
  231. package/front_end/panels/security/SecurityPanelSidebar.ts +7 -7
  232. package/front_end/panels/security/security-meta.ts +2 -2
  233. package/front_end/panels/sensors/LocationsSettingsTab.ts +19 -19
  234. package/front_end/panels/sensors/SensorsView.ts +27 -27
  235. package/front_end/panels/sensors/sensors-meta.ts +13 -167
  236. package/front_end/panels/settings/AISettingsTab.ts +98 -56
  237. package/front_end/panels/settings/EditFileSystemView.ts +2 -2
  238. package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +20 -20
  239. package/front_end/panels/settings/KeybindsSettingsTab.ts +20 -21
  240. package/front_end/panels/settings/SettingsScreen.ts +11 -11
  241. package/front_end/panels/settings/WorkspaceSettingsTab.ts +5 -5
  242. package/front_end/panels/settings/components/SyncSection.ts +12 -12
  243. package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +13 -13
  244. package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +31 -31
  245. package/front_end/panels/settings/emulation/emulation-meta.ts +1 -1
  246. package/front_end/panels/settings/settings-meta.ts +14 -14
  247. package/front_end/panels/sources/NavigatorView.ts +7 -6
  248. package/front_end/panels/sources/ScopeChainSidebarPane.ts +83 -37
  249. package/front_end/panels/sources/SourcesNavigator.ts +20 -18
  250. package/front_end/panels/sources/SourcesView.ts +10 -1
  251. package/front_end/panels/sources/scopeChainSidebarPane.css +12 -4
  252. package/front_end/panels/sources/sources-meta.ts +4 -4
  253. package/front_end/panels/timeline/CompatibilityTracksAppender.ts +5 -2
  254. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +2 -1
  255. package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +2 -1
  256. package/front_end/panels/timeline/TimelineFlameChartView.ts +1 -1
  257. package/front_end/panels/timeline/TimelinePanel.ts +2 -1
  258. package/front_end/panels/timeline/TimelineUIUtils.ts +5 -2
  259. package/front_end/panels/timeline/components/NetworkRequestDetails.ts +4 -2
  260. package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +4 -2
  261. package/front_end/panels/timeline/components/insights/ImageRef.ts +2 -1
  262. package/front_end/panels/utils/utils.ts +7 -3
  263. package/front_end/panels/web_audio/WebAudioView.ts +17 -18
  264. package/front_end/panels/web_audio/web_audio-meta.ts +3 -3
  265. package/front_end/panels/webauthn/WebauthnPane.ts +10 -10
  266. package/front_end/panels/whats_new/ReleaseNoteView.ts +1 -1
  267. package/front_end/panels/whats_new/whats_new-meta.ts +11 -11
  268. package/front_end/third_party/chromium/README.chromium +1 -1
  269. package/front_end/third_party/lit/lib/async-directive.d.ts +2 -1
  270. package/front_end/third_party/lit/lib/async-directive.js +1 -1
  271. package/front_end/third_party/lit/lib/async-directive.js.map +1 -1
  272. package/front_end/third_party/lit/lib/decorators.d.ts +2 -1
  273. package/front_end/third_party/lit/lib/decorators.js.map +1 -1
  274. package/front_end/third_party/lit/lib/directive.d.ts +2 -1
  275. package/front_end/third_party/lit/lib/directive.js.map +1 -1
  276. package/front_end/third_party/lit/lib/directives.d.ts +2 -1
  277. package/front_end/third_party/lit/lib/directives.js +8 -8
  278. package/front_end/third_party/lit/lib/directives.js.map +1 -1
  279. package/front_end/third_party/lit/lib/lit.d.ts +2 -1
  280. package/front_end/third_party/lit/lib/lit.js +1 -1
  281. package/front_end/third_party/lit/lib/lit.js.map +1 -1
  282. package/front_end/third_party/lit/lib/static-html.d.ts +2 -1
  283. package/front_end/third_party/lit/lib/static-html.js +1 -1
  284. package/front_end/third_party/lit/lib/static-html.js.map +1 -1
  285. package/front_end/third_party/lit/package.json +2 -2
  286. package/front_end/third_party/lit/rebuild.sh +1 -1
  287. package/front_end/third_party/lit/src/async-directive.ts +5 -0
  288. package/front_end/ui/components/dialogs/Dialog.ts +1 -1
  289. package/front_end/ui/components/dialogs/ShortcutDialog.ts +1 -1
  290. package/front_end/ui/components/dialogs/shortcutDialog.css +15 -12
  291. package/front_end/ui/components/diff_view/DiffView.ts +2 -2
  292. package/front_end/ui/components/issue_counter/IssueCounter.ts +3 -3
  293. package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +5 -5
  294. package/front_end/ui/components/lists/List.ts +2 -2
  295. package/front_end/ui/components/panel_feedback/PreviewToggle.ts +1 -1
  296. package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +5 -5
  297. package/front_end/ui/components/settings/SettingCheckbox.ts +1 -1
  298. package/front_end/ui/components/snackbars/Snackbar.ts +1 -1
  299. package/front_end/ui/components/survey_link/SurveyLink.ts +3 -3
  300. package/front_end/ui/components/text_editor/config.ts +2 -2
  301. package/front_end/ui/components/tree_outline/TreeOutline.ts +34 -1
  302. package/front_end/ui/legacy/ReportView.ts +5 -0
  303. package/front_end/ui/legacy/Treeoutline.ts +18 -0
  304. package/front_end/ui/legacy/View.ts +1 -1
  305. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +2 -0
  306. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +8 -3
  307. package/front_end/ui/legacy/components/data_grid/data_grid.ts +1 -0
  308. package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +1 -1
  309. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +100 -36
  310. package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +7 -1
  311. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +5 -0
  312. package/front_end/ui/legacy/components/utils/ImagePreview.ts +4 -2
  313. package/front_end/ui/legacy/inspectorCommon.css +5 -0
  314. package/front_end/ui/visual_logging/KnownContextValues.ts +4 -0
  315. package/mcp/mcp.ts +2 -0
  316. package/package.json +4 -4
  317. package/front_end/panels/profiler/ProfileView.ts +0 -610
@@ -5,23 +5,25 @@
5
5
  import type {Chrome} from '../../../extension-api/ExtensionAPI.js';
6
6
  import type * as Platform from '../../core/platform/platform.js';
7
7
  import type * as SDK from '../../core/sdk/sdk.js';
8
- import * as Bindings from '../bindings/bindings.js';
8
+ import type * as Bindings from '../bindings/bindings.js';
9
9
 
10
10
  import {PrivateAPI} from './ExtensionAPI.js';
11
11
  import {ExtensionEndpoint} from './ExtensionEndpoint.js';
12
12
 
13
13
  class LanguageExtensionEndpointImpl extends ExtensionEndpoint {
14
14
  private plugin: LanguageExtensionEndpoint;
15
- constructor(plugin: LanguageExtensionEndpoint, port: MessagePort) {
15
+ #pluginManager: Bindings.DebuggerLanguagePlugins.DebuggerLanguagePluginManager;
16
+ constructor(plugin: LanguageExtensionEndpoint, port: MessagePort,
17
+ pluginManager: Bindings.DebuggerLanguagePlugins.DebuggerLanguagePluginManager) {
16
18
  super(port);
17
19
  this.plugin = plugin;
20
+ this.#pluginManager = pluginManager;
18
21
  }
19
22
  protected override handleEvent({event}: {event: string}): void {
20
23
  switch (event) {
21
24
  case PrivateAPI.LanguageExtensionPluginEvents.UnregisteredLanguageExtensionPlugin: {
22
25
  this.disconnect();
23
- const {pluginManager} = Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance();
24
- pluginManager.removePlugin(this.plugin);
26
+ this.#pluginManager.removePlugin(this.plugin);
25
27
  break;
26
28
  }
27
29
  }
@@ -39,17 +41,16 @@ export class LanguageExtensionEndpoint implements Bindings.DebuggerLanguagePlugi
39
41
  readonly allowFileAccess: boolean;
40
42
  readonly name: string;
41
43
 
42
- constructor(
43
- allowFileAccess: boolean, extensionOrigin: string, name: string, supportedScriptTypes: {
44
- language: string,
45
- // eslint-disable-next-line @typescript-eslint/naming-convention
46
- symbol_types: string[],
47
- },
48
- port: MessagePort) {
44
+ constructor(allowFileAccess: boolean, extensionOrigin: string, name: string, supportedScriptTypes: {
45
+ language: string,
46
+ // eslint-disable-next-line @typescript-eslint/naming-convention
47
+ symbol_types: string[],
48
+ },
49
+ port: MessagePort, pluginManager: Bindings.DebuggerLanguagePlugins.DebuggerLanguagePluginManager) {
49
50
  this.name = name;
50
51
  this.extensionOrigin = extensionOrigin;
51
52
  this.supportedScriptTypes = supportedScriptTypes;
52
- this.endpoint = new LanguageExtensionEndpointImpl(this, port);
53
+ this.endpoint = new LanguageExtensionEndpointImpl(this, port, pluginManager);
53
54
  this.allowFileAccess = allowFileAccess;
54
55
  }
55
56
 
@@ -11,7 +11,7 @@ import type {MarkdownIssueDescription} from './MarkdownIssueDescription.js';
11
11
 
12
12
  const UIStrings = {
13
13
  /**
14
- * @description Title for Bounce Tracking Mitigation explainer url link.
14
+ * @description Title for Bounce Tracking Mitigation explainer URL link.
15
15
  */
16
16
  bounceTrackingMitigations: 'Bounce tracking mitigations',
17
17
  } as const;
@@ -15,7 +15,7 @@ import {
15
15
 
16
16
  const UIStrings = {
17
17
  /**
18
- * @description Title for Client Hint specification url link
18
+ * @description Title for Client Hint specification URL link.
19
19
  */
20
20
  clientHintsInfrastructure: 'Client Hints Infrastructure',
21
21
  } as const;
@@ -15,7 +15,7 @@ import {
15
15
 
16
16
  const UIStrings = {
17
17
  /**
18
- *@description Title for Connection-Allowlist specification url
18
+ * @description Title for Connection-Allowlist specification URL.
19
19
  */
20
20
  connectionAllowlistHeader: 'Connection-Allowlist specification',
21
21
  } as const;
@@ -15,23 +15,23 @@ import {
15
15
 
16
16
  const UIStrings = {
17
17
  /**
18
- * @description Title for CSP url link
18
+ * @description Title for CSP URL link.
19
19
  */
20
- contentSecurityPolicySource: 'Content Security Policy - Source Allowlists',
20
+ contentSecurityPolicySource: 'Content Security Policy - Source allowlists',
21
21
  /**
22
- * @description Title for CSP inline issue link
22
+ * @description Title for CSP inline issue link.
23
23
  */
24
- contentSecurityPolicyInlineCode: 'Content Security Policy - Inline Code',
24
+ contentSecurityPolicyInlineCode: 'Content Security Policy - Inline code',
25
25
  /**
26
- * @description Title for the CSP eval link
26
+ * @description Title for the CSP eval link.
27
27
  */
28
28
  contentSecurityPolicyEval: 'Content Security Policy - Eval',
29
29
  /**
30
- * @description Title for Trusted Types policy violation issue link. https://developer.mozilla.org/en-US/docs/Web/API/Trusted_Types_API
30
+ * @description Title for Trusted Types policy violation issue link (https://developer.mozilla.org/en-US/docs/Web/API/Trusted_Types_API).
31
31
  */
32
32
  trustedTypesFixViolations: 'Trusted Types - Fix violations',
33
33
  /**
34
- * @description Title for Trusted Types policy violation issue link. https://developer.mozilla.org/en-US/docs/Web/API/Trusted_Types_API
34
+ * @description Title for Trusted Types policy violation issue link (https://developer.mozilla.org/en-US/docs/Web/API/Trusted_Types_API).
35
35
  */
36
36
  trustedTypesPolicyViolation: 'Trusted Types - Policy violation',
37
37
  } as const;
@@ -11,9 +11,9 @@ import type {MarkdownIssueDescription} from './MarkdownIssueDescription.js';
11
11
 
12
12
  const UIStrings = {
13
13
  /**
14
- * @description Label for a link for third-party cookie Issues.
14
+ * @description Label for a link for third-party cookie issues.
15
15
  */
16
- thirdPartyPhaseoutExplained: 'Changes to Chrome\'s treatment of third-party cookies',
16
+ thirdPartyPhaseoutExplained: 'Changes to Chromes treatment of third-party cookies',
17
17
  } as const;
18
18
  const str_ = i18n.i18n.registerUIStrings('models/issues_manager/CookieDeprecationMetadataIssue.ts', UIStrings);
19
19
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -18,22 +18,21 @@ import {
18
18
 
19
19
  const UIStrings = {
20
20
  /**
21
- * @description Label for the link for SameSiteCookies Issues
21
+ * @description Label for the link for SameSite cookie issues.
22
22
  */
23
23
  samesiteCookiesExplained: 'SameSite cookies explained',
24
24
  /**
25
- * @description Label for the link for Schemeful Same-Site Issues
25
+ * @description Label for the link for Schemeful Same-Site issues.
26
26
  */
27
- howSchemefulSamesiteWorks: 'How Schemeful Same-Site Works',
27
+ howSchemefulSamesiteWorks: 'How Schemeful Same-Site works',
28
28
  /**
29
- * @description Label for a link for cross-site redirect Issues.
29
+ * @description Label for a link for cross-site redirect issues.
30
30
  */
31
31
  fileCrosSiteRedirectBug: 'File a bug',
32
32
  /**
33
- * @description text to show in Console panel when a third-party cookie is blocked in Chrome.
33
+ * @description Text to show in Console panel when a third-party cookie is blocked in Chrome.
34
34
  */
35
- consoleTpcdErrorMessage:
36
- 'Third-party cookie is blocked in Chrome either because of Chrome flags or browser configuration.',
35
+ consoleTpcdErrorMessage: 'Third-party cookie blocked in Chrome due to Chrome flags or browser settings.',
37
36
 
38
37
  } as const;
39
38
  const str_ = i18n.i18n.registerUIStrings('models/issues_manager/CookieIssue.ts', UIStrings);
@@ -11,13 +11,13 @@ import type {MarkdownIssueDescription} from './MarkdownIssueDescription.js';
11
11
 
12
12
  const UIStrings = {
13
13
  /**
14
- * @description Label for the link for CORS Local Network Access issues
14
+ * @description Label for the link for CORS Local Network Access issues.
15
15
  */
16
16
  corsLocalNetworkAccess: 'Local Network Access',
17
17
  /**
18
- * @description Label for the link for CORS network issues
18
+ * @description Label for the link for CORS network issues.
19
19
  */
20
- CORS: 'Cross-Origin Resource Sharing (`CORS`)',
20
+ CORS: 'Cross-Origin Resource Sharing (CORS)',
21
21
  } as const;
22
22
  const str_ = i18n.i18n.registerUIStrings('models/issues_manager/CorsIssue.ts', UIStrings);
23
23
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -15,11 +15,11 @@ import {
15
15
 
16
16
  const UIStrings = {
17
17
  /**
18
- * @description Link text for a link to external documentation
18
+ * @description Link text for a link to external documentation.
19
19
  */
20
20
  coopAndCoep: 'COOP and COEP',
21
21
  /**
22
- * @description Title for an external link to more information in the issues view
22
+ * @description Title for an external link to more information in the Issues view.
23
23
  */
24
24
  samesiteAndSameorigin: 'Same-Site and Same-Origin',
25
25
  } as const;
@@ -12,16 +12,16 @@ import {type MarkdownIssueDescription, resolveLazyDescription} from './MarkdownI
12
12
 
13
13
  const UIStrings = {
14
14
  /**
15
- * @description This links to the chrome feature status page when one exists.
15
+ * @description This links to the Chrome feature status page when one exists.
16
16
  */
17
17
  feature: 'Check the feature status page for more details.',
18
18
  /**
19
- * @description This links to the chromium dash schedule when a milestone is set.
19
+ * @description This links to the Chromium Dash schedule when a milestone is set.
20
20
  * @example {100} milestone
21
21
  */
22
22
  milestone: 'This change will go into effect with milestone {milestone}.',
23
23
  /**
24
- * @description Title of issue raised when a deprecated feature is used
24
+ * @description Title of issue raised when a deprecated feature is used.
25
25
  */
26
26
  title: 'Deprecated feature used',
27
27
  } as const;
@@ -15,7 +15,7 @@ import {
15
15
 
16
16
  const UIStrings = {
17
17
  /**
18
- * @description Title for Email Verification Protocol specification url link
18
+ * @description Title for Email Verification Protocol specification URL link.
19
19
  */
20
20
  emailVerification: 'Email Verification Protocol',
21
21
  } as const;
@@ -15,7 +15,7 @@ import {
15
15
 
16
16
  const UIStrings = {
17
17
  /**
18
- * @description Title for Client Hint specification url link
18
+ * @description Title for Federated Credential Management API specification URL link.
19
19
  */
20
20
  fedCm: 'Federated Credential Management API',
21
21
  } as const;
@@ -15,7 +15,7 @@ import {
15
15
 
16
16
  const UIStrings = {
17
17
  /**
18
- * @description Title for Client Hint specification url link
18
+ * @description Title for Federated Credential Management User Info API specification URL link.
19
19
  */
20
20
  fedCmUserInfo: 'Federated Credential Management User Info API',
21
21
  } as const;
@@ -15,37 +15,37 @@ import {
15
15
 
16
16
  const UIStrings = {
17
17
  /**
18
- * @description title for autofill documentation page
18
+ * @description Title for autofill documentation page.
19
19
  */
20
20
  howDoesAutofillWorkPageTitle: 'How does autofill work?',
21
21
 
22
22
  /**
23
- * @description title for label form elements usage example page
23
+ * @description Title for label form elements usage example page.
24
24
  */
25
25
  labelFormlementsPageTitle: 'The label elements',
26
26
 
27
27
  /**
28
- * @description title for input form elements usage example page
28
+ * @description Title for input form elements usage example page.
29
29
  */
30
30
  inputFormElementPageTitle: 'The form input element',
31
31
 
32
32
  /**
33
- * @description title for autocomplete attribute documentation page.
33
+ * @description Title for autocomplete attribute documentation page.
34
34
  */
35
35
  autocompleteAttributePageTitle: 'HTML attribute: autocomplete',
36
36
 
37
37
  /**
38
- * @description title for CORB explainer.
38
+ * @description Title for CORB explainer.
39
39
  */
40
40
  corbExplainerPageTitle: 'CORB explainer',
41
41
 
42
42
  /**
43
- * @description title for history intervention documentation page.
43
+ * @description Title for history intervention documentation page.
44
44
  */
45
45
  historyManipulationInterventionPageTitle: 'History manipulation intervention explainer',
46
46
 
47
47
  /**
48
- * @description title for back-to-ad intervention documentation page.
48
+ * @description Title for back-to-ad intervention documentation page.
49
49
  */
50
50
  backToAdInterventionPageTitle: 'Back-to-ad intervention explainer',
51
51
  } as const;
@@ -11,9 +11,9 @@ import type {MarkdownIssueDescription} from './MarkdownIssueDescription.js';
11
11
 
12
12
  const UIStrings = {
13
13
  /**
14
- * @description Title for a learn more link in Heavy Ads issue description
14
+ * @description Title for a learn more link in heavy ads issue description.
15
15
  */
16
- handlingHeavyAdInterventions: 'Handling Heavy Ad Interventions',
16
+ handlingHeavyAdInterventions: 'Handling heavy ad interventions',
17
17
  } as const;
18
18
  const str_ = i18n.i18n.registerUIStrings('models/issues_manager/HeavyAdIssue.ts', UIStrings);
19
19
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -57,7 +57,7 @@ export class HeavyAdIssue extends Issue<Protocol.Audits.HeavyAdIssueDetails> {
57
57
  issuesModel: SDK.IssuesModel.IssuesModel|null, inspectorIssue: Protocol.Audits.InspectorIssue): HeavyAdIssue[] {
58
58
  const heavyAdIssueDetails = inspectorIssue.details.heavyAdIssueDetails;
59
59
  if (!heavyAdIssueDetails) {
60
- console.warn('Heavy Ad issue without details received.');
60
+ console.warn('Heavy ad issue without details received.');
61
61
  return [];
62
62
  }
63
63
  return [new HeavyAdIssue(heavyAdIssueDetails, issuesModel)];
@@ -13,27 +13,27 @@ import type {MarkdownIssueDescription} from './MarkdownIssueDescription.js';
13
13
 
14
14
  const UIStrings = {
15
15
  /**
16
- * @description The kind of an issue (plural) (Issues are categorized into kinds).
16
+ * @description The kind of an issue (plural, issues are categorized into kinds).
17
17
  */
18
18
  improvements: 'Improvements',
19
19
  /**
20
- * @description The kind of an issue (plural) (Issues are categorized into kinds).
20
+ * @description The kind of an issue (plural, issues are categorized into kinds).
21
21
  */
22
- pageErrors: 'Page Errors',
22
+ pageErrors: 'Page errors',
23
23
  /**
24
- * @description The kind of an issue (plural) (Issues are categorized into kinds).
24
+ * @description The kind of an issue (plural, issues are categorized into kinds).
25
25
  */
26
- breakingChanges: 'Breaking Changes',
26
+ breakingChanges: 'Breaking changes',
27
27
  /**
28
- * @description A description for a kind of issue we display in the issues tab.
28
+ * @description A description for a kind of issue we display in the Issues tab.
29
29
  */
30
30
  pageErrorIssue: 'A page error issue: the page is not working correctly',
31
31
  /**
32
- * @description A description for a kind of issue we display in the issues tab.
32
+ * @description A description for a kind of issue we display in the Issues tab.
33
33
  */
34
34
  breakingChangeIssue: 'A breaking change issue: the page may stop working in an upcoming version of Chrome',
35
35
  /**
36
- * @description A description for a kind of issue we display in the issues tab.
36
+ * @description A description for a kind of issue we display in the Issues tab.
37
37
  */
38
38
  improvementIssue: 'An improvement issue: there is an opportunity to improve the page',
39
39
  } as const;
@@ -11,7 +11,7 @@ import type {MarkdownIssueDescription} from './MarkdownIssueDescription.js';
11
11
 
12
12
  const UIStrings = {
13
13
  /**
14
- * @description Label for the link for Mixed Content Issues
14
+ * @description Label for the link for mixed content issues.
15
15
  */
16
16
  preventingMixedContent: 'Preventing mixed content',
17
17
  } as const;
@@ -11,13 +11,13 @@ import type {MarkdownIssueDescription} from './MarkdownIssueDescription.js';
11
11
 
12
12
  const UIStrings = {
13
13
  /**
14
- * @description Title for Partitioning BlobURL explainer url link.
14
+ * @description Title for Partitioning BlobURL explainer URL link.
15
15
  */
16
16
  partitioningBlobURL: 'Partitioning BlobURL',
17
17
  /**
18
- * @description Title for Chrome Status Entry url link.
18
+ * @description Title for Chrome Status entry URL link.
19
19
  */
20
- chromeStatusEntry: 'Chrome Status Entry'
20
+ chromeStatusEntry: 'Chrome Status entry'
21
21
  } as const;
22
22
 
23
23
  const str_ = i18n.i18n.registerUIStrings('models/issues_manager/PartitioningBlobURLIssue.ts', UIStrings);
@@ -11,7 +11,7 @@ import type {MarkdownIssueDescription} from './MarkdownIssueDescription.js';
11
11
 
12
12
  const UIStrings = {
13
13
  /**
14
- * @description Link title for the Quirks Mode issue in the Issues panel
14
+ * @description Link title for the Quirks Mode issue in the Issues panel.
15
15
  */
16
16
  documentCompatibilityMode: 'Document compatibility mode',
17
17
  } as const;
@@ -15,11 +15,11 @@ import {
15
15
 
16
16
  const UIStrings = {
17
17
  /**
18
- * @description Title for HTTP Message Signatures specification url
18
+ * @description Title for HTTP Message Signatures specification URL.
19
19
  */
20
20
  httpMessageSignatures: 'HTTP Message Signatures (RFC9421)',
21
21
  /**
22
- * @description Title for Signature-based Integrity specification url
22
+ * @description Title for Signature-based Integrity specification URL.
23
23
  */
24
24
  signatureBasedIntegrity: 'Signature-based Integrity',
25
25
  } as const;
@@ -11,9 +11,9 @@ import type {MarkdownIssueDescription} from './MarkdownIssueDescription.js';
11
11
 
12
12
  const UIStrings = {
13
13
  /**
14
- * @description Title for a learn more link in Selective Permissions Intervention issue description
14
+ * @description Title for a learn more link in selective permissions intervention issue description.
15
15
  */
16
- selectivePermissionsIntervention: 'Selective Permissions Intervention',
16
+ selectivePermissionsIntervention: 'Selective permissions intervention',
17
17
  } as const;
18
18
  const str_ = i18n.i18n.registerUIStrings('models/issues_manager/SelectivePermissionsInterventionIssue.ts', UIStrings);
19
19
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -11,10 +11,10 @@ import type {MarkdownIssueDescription} from './MarkdownIssueDescription.js';
11
11
 
12
12
  const UIStrings = {
13
13
  /**
14
- * @description Label for the link for SharedArrayBuffer Issues. The full text reads "Enabling `SharedArrayBuffer`"
14
+ * @description Label for the link for SharedArrayBuffer issues. The full text reads "Enabling SharedArrayBuffer"
15
15
  * and is the title of an article that describes how to enable a JavaScript feature called SharedArrayBuffer.
16
16
  */
17
- enablingSharedArrayBuffer: 'Enabling `SharedArrayBuffer`',
17
+ enablingSharedArrayBuffer: 'Enabling SharedArrayBuffer',
18
18
  } as const;
19
19
  const str_ = i18n.i18n.registerUIStrings('models/issues_manager/SharedArrayBufferIssue.ts', UIStrings);
20
20
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -15,7 +15,7 @@ import {
15
15
 
16
16
  const UIStrings = {
17
17
  /**
18
- * @description Title for Compression Dictionary Transport specification url link
18
+ * @description Title for Compression Dictionary Transport specification URL link.
19
19
  */
20
20
  compressionDictionaryTransport: 'Compression Dictionary Transport',
21
21
  } as const;
@@ -15,13 +15,13 @@ import {
15
15
 
16
16
  const UIStrings = {
17
17
  /**
18
- *@description Title for HTTP Unencoded Digest specification url
18
+ * @description Title for HTTP Unencoded Digest specification URL.
19
19
  */
20
20
  unencodedDigestHeader: 'HTTP Unencoded Digest specification',
21
21
  /**
22
- *@description Title for the URL of the integration of unencoded-digest and SRI.
22
+ * @description Title for the URL of the integration of unencoded-digest and SRI.
23
23
  */
24
- integrityIntegration: 'Server-Initiated Integrity Checks',
24
+ integrityIntegration: 'Server-initiated integrity checks',
25
25
  } as const;
26
26
  const str_ = i18n.i18n.registerUIStrings('models/issues_manager/UnencodedDigestIssue.ts', UIStrings);
27
27
  const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
@@ -8386,6 +8386,10 @@ export const NativeFunctions = [
8386
8386
  name: "getTypeMapping",
8387
8387
  signatures: [["?ns"]]
8388
8388
  },
8389
+ {
8390
+ name: "markConditional",
8391
+ signatures: [["markName"]]
8392
+ },
8389
8393
  {
8390
8394
  name: "PerformanceMark",
8391
8395
  signatures: [["markName","?markOptions"]]
@@ -8448,7 +8452,7 @@ export const NativeFunctions = [
8448
8452
  },
8449
8453
  {
8450
8454
  name: "executeTool",
8451
- signatures: [["tool","input_arguments","?options"]]
8455
+ signatures: [["tool","inputArguments","?options"]]
8452
8456
  },
8453
8457
  {
8454
8458
  name: "TaskController",
@@ -38,9 +38,9 @@ export class StackTraceModel extends SDK.SDKModel.SDKModel<unknown> {
38
38
  readonly #trie = new Trie();
39
39
  readonly #mutex = new Common.Mutex.Mutex();
40
40
 
41
- /** @returns the {@link StackTraceModel} for the target, or the model for the primaryPageTarget when passing null/undefined */
41
+ /** @returns the {@link StackTraceModel} for the target. Throws if the target or its model cannot be found. */
42
42
  static #modelForTarget(target: SDK.Target.Target|null|undefined): StackTraceModel {
43
- const model = (target ?? SDK.TargetManager.TargetManager.instance().primaryPageTarget())?.model(StackTraceModel);
43
+ const model = target?.model(StackTraceModel);
44
44
  if (!model) {
45
45
  throw new Error('Unable to find StackTraceModel');
46
46
  }
@@ -161,7 +161,7 @@ export class StackTraceModel extends SDK.SDKModel.SDKModel<unknown> {
161
161
  // Skip empty async fragments, they don't add value.
162
162
  continue;
163
163
  }
164
- const model = StackTraceModel.#modelForTarget(target);
164
+ const model = StackTraceModel.#modelForTarget(target ?? this.target().targetManager().primaryPageTarget());
165
165
  const targetDebuggerModel = target.model(SDK.DebuggerModel.DebuggerModel);
166
166
  const asyncFrames = asyncStackTrace.callFrames.map((frame): RawFrame => {
167
167
  const isWasm = targetDebuggerModel?.isWasm(frame.scriptId) ?? false;
@@ -59,6 +59,33 @@ export class ContentData {
59
59
  }
60
60
  }
61
61
 
62
+ static async fromCompressedBase64(data: string, mimeType: string, charset?: string,
63
+ contentEncoding?: string): Promise<ContentData> {
64
+ const normalizedEncoding = contentEncoding?.toLowerCase();
65
+ if (!normalizedEncoding) {
66
+ return new ContentData(data, true, mimeType, charset);
67
+ }
68
+
69
+ let contentAsBase64 = data;
70
+ try {
71
+ const bytes = Common.Base64.decode(data);
72
+ let decompressed: ArrayBuffer|null = null;
73
+ if (normalizedEncoding.includes('gzip') && Common.Gzip.isGzip(bytes.buffer)) {
74
+ decompressed = await Common.Gzip.decompressToBuffer(bytes.buffer);
75
+ } else if (normalizedEncoding.includes('deflate')) {
76
+ decompressed = await Common.Gzip.decompressDeflateToBuffer(bytes.buffer);
77
+ }
78
+
79
+ if (decompressed) {
80
+ contentAsBase64 = await Common.Base64.encode(decompressed);
81
+ }
82
+ } catch (e) {
83
+ console.warn('Failed to decompress base64 content data:', e);
84
+ }
85
+
86
+ return new ContentData(contentAsBase64, true, mimeType, charset);
87
+ }
88
+
62
89
  /**
63
90
  * Returns the data as base64.
64
91
  *
@@ -72,9 +72,13 @@ export class SamplesIntegrator {
72
72
  #lockedJsStackDepth: number[] = [];
73
73
  /**
74
74
  * Used to keep track when samples should be integrated even if they
75
- * are not children of invocation trace events. This is useful in
76
- * cases where we can be missing the start of JS invocation events if
77
- * we start tracing half-way through.
75
+ * are not children of invocation trace events. This is used in two cases:
76
+ * 1. We start tracing half-way through, so we miss the start of JS
77
+ * invocation events.
78
+ * 2. On threads (like Web Workers) without real JS invocation parent events,
79
+ * but where trace events (like SchedulePostMessage) integrate stack traces.
80
+ * Enabling fake JS mode allows subsequent samples to be processed and
81
+ * eventually correct the stack, preventing a deadlock.
78
82
  */
79
83
  #fakeJSInvocation = false;
80
84
  /**
@@ -153,7 +157,7 @@ export class SamplesIntegrator {
153
157
  this.#onProfileCall(event, parentEvent);
154
158
  continue;
155
159
  }
156
- this.#onTraceEventStart(event);
160
+ this.#onTraceEventStart(event, parentEvent);
157
161
  stack.push(event);
158
162
  }
159
163
  while (stack.length) {
@@ -166,7 +170,7 @@ export class SamplesIntegrator {
166
170
  return this.#constructedProfileCalls;
167
171
  }
168
172
 
169
- #onTraceEventStart(event: Types.Events.Event): void {
173
+ #onTraceEventStart(event: Types.Events.Event, parent?: Types.Events.Event): void {
170
174
  // Top level events cannot be nested into JS frames so we reset
171
175
  // the stack when we find one.
172
176
  if (event.name === Types.Events.Name.RUN_MICROTASKS || event.name === Types.Events.Name.RUN_TASK) {
@@ -180,6 +184,18 @@ export class SamplesIntegrator {
180
184
  this.#fakeJSInvocation = false;
181
185
  }
182
186
  this.#extractStackTrace(event);
187
+ if (extractSampleTraceId(event)) {
188
+ const hasJSInvocationParent = parent && Types.Events.isJSInvocationEvent(parent);
189
+ if (!hasJSInvocationParent) {
190
+ // If the event has a sampleTraceId (meaning it has a stack trace) but
191
+ // no JS invocation parent, we enter fake JS mode. This ensures that
192
+ // subsequent samples on this thread are processed, allowing the stack
193
+ // to be correctly updated/truncated. Without this, subsequent samples
194
+ // would be ignored because the stack is non-empty but we are not
195
+ // considered to be in JS.
196
+ this.#fakeJSInvocation = true;
197
+ }
198
+ }
183
199
  // Keep track of the call frames in the stack before the event
184
200
  // happened. For the duration of this event, these frames cannot
185
201
  // change (none can be terminated before this event finishes).