chrome-devtools-frontend 1.0.1616061 → 1.0.1621064
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.
- package/AUTHORS +1 -0
- package/docs/checklist/README.md +8 -7
- package/eslint.config.mjs +7 -0
- package/front_end/core/common/Object.ts +11 -2
- package/front_end/core/dom_extension/DOMExtension.ts +11 -8
- package/front_end/core/host/AidaClient.ts +8 -0
- package/front_end/core/host/AidaGcaTranslation.ts +1 -0
- package/front_end/core/host/UserMetrics.ts +0 -1
- package/front_end/core/platform/api/HostRuntime.ts +2 -2
- package/front_end/core/platform/browser/HostRuntime.ts +4 -2
- package/front_end/core/platform/node/HostRuntime.ts +2 -2
- package/front_end/core/root/ExperimentNames.ts +0 -1
- package/front_end/core/sdk/NetworkManager.ts +30 -4
- package/front_end/core/sdk/NetworkRequest.ts +2 -10
- package/front_end/core/sdk/Resource.ts +2 -1
- package/front_end/core/sdk/ServerSentEventsProtocol.ts +1 -1
- package/front_end/core/sdk/TraceObject.ts +7 -2
- package/front_end/entrypoint_template.html +1 -2
- package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +119 -15
- package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +0 -2
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +43 -33
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +2 -1
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +9 -6
- package/front_end/entrypoints/main/MainImpl.ts +0 -2
- package/front_end/generated/InspectorBackendCommands.ts +8 -7
- package/front_end/generated/SupportedCSSProperties.js +119 -100
- package/front_end/generated/protocol-mapping.d.ts +1 -9
- package/front_end/generated/protocol-proxy-api.d.ts +1 -9
- package/front_end/generated/protocol.ts +24 -1
- package/front_end/legacy/legacy-defs.d.ts +1 -1
- package/front_end/models/ai_assistance/AiConversation.ts +1 -0
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +39 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +2 -0
- package/front_end/models/ai_assistance/agents/ConversationSummaryAgent.ts +28 -16
- package/front_end/models/ai_assistance/agents/GreenDevAgent.ts +512 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +112 -145
- package/front_end/models/ai_assistance/agents/README.md +0 -5
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +9 -16
- package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +19 -1
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +48 -13
- package/front_end/models/bindings/SymbolizedError.ts +95 -8
- package/front_end/models/emulation/DeviceModeModel.ts +42 -13
- package/front_end/models/emulation/EmulatedDevices.ts +1 -1
- package/front_end/models/issues_manager/IssuesManager.ts +13 -6
- package/front_end/models/issues_manager/IssuesManagerEvents.ts +1 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +2 -2
- package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +1 -0
- package/front_end/models/stack_trace/DetailedErrorStackParser.ts +49 -10
- package/front_end/models/stack_trace/ErrorStackParser.ts +18 -0
- package/front_end/models/stack_trace/StackTraceModel.ts +5 -1
- package/front_end/models/text_utils/ContentData.ts +71 -10
- package/front_end/models/trace/types/File.ts +8 -1
- package/front_end/models/web_mcp/WebMCPModel.ts +22 -0
- package/front_end/models/workspace/UISourceCode.ts +4 -4
- package/front_end/panels/accessibility/ARIAAttributesView.ts +4 -4
- package/front_end/panels/accessibility/AccessibilitySubPane.ts +3 -2
- package/front_end/panels/accessibility/SourceOrderView.ts +4 -4
- package/front_end/panels/ai_assistance/ai_assistance.ts +1 -0
- package/front_end/panels/ai_assistance/components/ChatInput.ts +66 -0
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +144 -21
- package/front_end/panels/ai_assistance/components/ChatView.ts +43 -8
- package/front_end/panels/ai_assistance/components/ExportForAgentsDialog.ts +1 -0
- package/front_end/panels/ai_assistance/components/WalkthroughUtils.ts +74 -0
- package/front_end/panels/ai_assistance/components/WalkthroughView.ts +34 -5
- package/front_end/panels/ai_assistance/components/chatMessage.css +11 -0
- package/front_end/panels/ai_assistance/components/walkthroughView.css +7 -0
- package/front_end/panels/application/ApplicationPanelTreeElement.ts +1 -1
- package/front_end/panels/application/CookieItemsView.ts +8 -9
- package/front_end/panels/application/DOMStorageItemsView.ts +3 -3
- package/front_end/panels/application/DeviceBoundSessionsModel.ts +7 -0
- package/front_end/panels/application/DeviceBoundSessionsTreeElement.ts +21 -0
- package/front_end/panels/application/DeviceBoundSessionsView.ts +2 -2
- package/front_end/panels/application/ExtensionStorageItemsView.ts +1 -1
- package/front_end/panels/application/KeyValueStorageItemsView.ts +32 -14
- package/front_end/panels/application/ResourcesPanel.ts +5 -5
- package/front_end/panels/application/StorageItemsToolbar.ts +0 -19
- package/front_end/panels/application/WebMCPView.ts +285 -86
- package/front_end/panels/application/components/BounceTrackingMitigationsView.ts +4 -4
- package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +4 -4
- package/front_end/panels/application/webMCPView.css +261 -182
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +9 -5
- package/front_end/panels/changes/ChangesSidebar.ts +2 -2
- package/front_end/panels/changes/ChangesView.ts +9 -14
- package/front_end/panels/console/ConsolePanel.ts +10 -3
- package/front_end/panels/console/ConsoleSidebar.ts +5 -5
- package/front_end/panels/console/ConsoleView.ts +11 -4
- package/front_end/panels/console/ConsoleViewMessage.ts +1 -19
- package/front_end/panels/coverage/CoverageView.ts +4 -5
- package/front_end/panels/elements/ElementsPanel.ts +9 -12
- package/front_end/panels/elements/ElementsSidebarPane.ts +4 -5
- package/front_end/panels/elements/ElementsTreeElement.ts +61 -0
- package/front_end/panels/elements/ElementsTreeOutline.ts +46 -0
- package/front_end/panels/elements/LayersWidget.ts +2 -2
- package/front_end/panels/elements/MetricsSidebarPane.ts +5 -4
- package/front_end/panels/elements/StylePropertiesSection.ts +1 -1
- package/front_end/panels/elements/StylePropertyTreeElement.ts +11 -6
- package/front_end/panels/elements/StylesSidebarPane.ts +4 -1
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +19 -20
- package/front_end/panels/elements/components/ElementsBreadcrumbsUtils.ts +29 -29
- package/front_end/panels/elements/components/QueryContainer.ts +5 -6
- package/front_end/panels/elements/components/components.ts +0 -2
- package/front_end/panels/emulation/MediaQueryInspector.ts +4 -7
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +4 -7
- package/front_end/panels/layer_viewer/Layers3DView.ts +2 -2
- package/front_end/panels/lighthouse/LighthouseStartView.ts +2 -2
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +47 -66
- package/front_end/panels/network/NetworkConfigView.ts +11 -11
- package/front_end/panels/network/RequestConditionsDrawer.ts +6 -4
- package/front_end/panels/network/RequestCookiesView.ts +2 -2
- package/front_end/panels/network/RequestDeviceBoundSessionsView.ts +2 -2
- package/front_end/panels/network/RequestHeadersView.ts +2 -2
- package/front_end/panels/network/components/DirectSocketConnectionView.ts +4 -5
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +6 -9
- package/front_end/panels/profiler/HeapProfileView.ts +29 -4
- package/front_end/panels/profiler/ProfilesPanel.ts +1 -1
- package/front_end/panels/protocol_monitor/JSONEditor.css +8 -1
- package/front_end/panels/protocol_monitor/JSONEditor.ts +7 -2
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +6 -4
- package/front_end/panels/recorder/components/ControlButton.ts +4 -4
- package/front_end/panels/recorder/components/StepView.ts +6 -6
- package/front_end/panels/search/SearchView.ts +4 -7
- package/front_end/panels/sources/DebuggerPausedMessage.ts +18 -22
- package/front_end/panels/sources/SourcesView.ts +1 -1
- package/front_end/panels/sources/TabbedEditorContainer.ts +2 -2
- package/front_end/panels/sources/ThreadsSidebarPane.ts +2 -4
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +24 -20
- package/front_end/panels/timeline/StatusDialog.ts +5 -8
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +10 -0
- package/front_end/panels/timeline/TimelineLoader.ts +3 -4
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +2 -2
- package/front_end/panels/timeline/components/TimelineRangeSummaryView.ts +2 -0
- package/front_end/panels/timeline/components/TimelineSummary.ts +9 -1
- package/front_end/panels/timeline/components/timelineSummary.css +4 -0
- package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.ts +2 -2
- package/front_end/panels/timeline/thirdPartyTreeView.css +8 -1
- package/front_end/panels/web_audio/WebAudioView.ts +5 -4
- package/front_end/panels/whats_new/ReleaseNoteText.ts +9 -9
- package/front_end/panels/whats_new/resources/WNDT.md +9 -6
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts +41 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.d.ts +13 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.js +21 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +5 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js +52 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts +25 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/third_party/urlpattern-polyfill/urlpattern-polyfill.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/third_party/urlpattern-polyfill/urlpattern-polyfill.js +853 -0
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +91 -11
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +1046 -33
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts +41 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.d.ts +13 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.js +21 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +5 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js +52 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts +25 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/third_party/urlpattern-polyfill/urlpattern-polyfill.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/third_party/urlpattern-polyfill/urlpattern-polyfill.js +805 -0
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +91 -11
- package/front_end/third_party/puppeteer/package/package.json +3 -2
- package/front_end/third_party/puppeteer/package/src/api/ElementHandle.ts +53 -11
- package/front_end/third_party/puppeteer/package/src/api/Extension.ts +29 -1
- package/front_end/third_party/puppeteer/package/src/bidi/ElementHandle.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +6 -0
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserConnector.ts +2 -0
- package/front_end/third_party/puppeteer/package/src/cdp/ElementHandle.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Extension.ts +9 -2
- package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +59 -0
- package/front_end/third_party/puppeteer/package/src/cdp/WebMCP.ts +6 -1
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +26 -0
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +2 -0
- package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +0 -1
- package/front_end/third_party/puppeteer/package/src/revisions.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +2 -1
- package/front_end/third_party/web-vitals/README.chromium +2 -2
- package/front_end/third_party/web-vitals/package/README.md +21 -10
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.js +2 -4
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.js +1 -2
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.d.ts +4 -0
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +44 -39
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.js +25 -19
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.js +1 -2
- package/front_end/third_party/web-vitals/package/dist/modules/lib/doubleRAF.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getActivationStart.js +1 -2
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getLoadState.js +16 -18
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.js +2 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/observe.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.js +1 -3
- package/front_end/third_party/web-vitals/package/dist/modules/lib/whenActivated.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/whenIdleOrHidden.js +11 -7
- package/front_end/third_party/web-vitals/package/dist/modules/onCLS.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/types/inp.d.ts +4 -0
- package/front_end/third_party/web-vitals/package/dist/modules/types.d.ts +1 -2
- package/front_end/third_party/web-vitals/package/dist/modules/types.js +0 -1
- package/front_end/third_party/web-vitals/package/package.json +24 -27
- package/front_end/third_party/web-vitals/package/src/attribution/onCLS.ts +2 -7
- package/front_end/third_party/web-vitals/package/src/attribution/onFCP.ts +1 -2
- package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +49 -43
- package/front_end/third_party/web-vitals/package/src/attribution/onLCP.ts +27 -24
- package/front_end/third_party/web-vitals/package/src/attribution/onTTFB.ts +1 -2
- package/front_end/third_party/web-vitals/package/src/lib/doubleRAF.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/getActivationStart.ts +1 -2
- package/front_end/third_party/web-vitals/package/src/lib/getLoadState.ts +21 -20
- package/front_end/third_party/web-vitals/package/src/lib/getVisibilityWatcher.ts +2 -3
- package/front_end/third_party/web-vitals/package/src/lib/observe.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/polyfills/interactionCountPolyfill.ts +2 -4
- package/front_end/third_party/web-vitals/package/src/lib/whenActivated.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/whenIdleOrHidden.ts +13 -7
- package/front_end/third_party/web-vitals/package/src/onCLS.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/types/inp.ts +4 -0
- package/front_end/third_party/web-vitals/package/src/types.ts +1 -2
- package/front_end/third_party/web-vitals/patches/0001-Add-onEachInteraction-to-onINP-options.patch +13 -74
- package/front_end/third_party/web-vitals/rebuild.sh +3 -3
- package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +0 -1
- package/front_end/ui/components/icon_button/iconButton.css +1 -0
- package/front_end/ui/components/legacy_wrapper/LegacyWrapper.ts +6 -6
- package/front_end/ui/components/lists/list.css +4 -0
- package/front_end/ui/legacy/Dialog.ts +21 -2
- package/front_end/ui/legacy/SoftContextMenu.ts +3 -3
- package/front_end/ui/legacy/SplitWidget.ts +9 -9
- package/front_end/ui/legacy/TabbedPane.ts +12 -12
- package/front_end/ui/legacy/View.ts +24 -22
- package/front_end/ui/legacy/ViewManager.ts +12 -12
- package/front_end/ui/legacy/ViewRegistration.ts +2 -2
- package/front_end/ui/legacy/Widget.ts +165 -119
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +10 -5
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +9 -6
- package/front_end/ui/legacy/components/utils/Linkifier.ts +37 -11
- package/front_end/ui/legacy/components/utils/jsUtils.css +1 -0
- package/front_end/ui/legacy/inspectorCommon.css +0 -6
- package/front_end/ui/lit/render.ts +11 -9
- package/front_end/ui/visual_logging/KnownContextValues.ts +36 -0
- package/package.json +1 -1
- package/front_end/Images/src/dots-circle.svg +0 -10
- package/front_end/panels/elements/components/Helper.ts +0 -35
- package/front_end/third_party/web-vitals/package/dist/modules/types/polyfills.d.ts +0 -4
- package/front_end/third_party/web-vitals/package/dist/modules/types/polyfills.js +0 -16
- package/front_end/third_party/web-vitals/package/src/types/polyfills.ts +0 -24
|
@@ -7,7 +7,7 @@ import * as Platform from '../../core/platform/platform.js';
|
|
|
7
7
|
import * as Root from '../../core/root/root.js';
|
|
8
8
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
9
9
|
import * as Protocol from '../../generated/protocol.js';
|
|
10
|
-
import
|
|
10
|
+
import * as StackTrace from '../stack_trace/stack_trace.js';
|
|
11
11
|
// eslint-disable-next-line @devtools/es-modules-import
|
|
12
12
|
import * as StackTraceImpl from '../stack_trace/stack_trace_impl.js';
|
|
13
13
|
import type * as TextUtils from '../text_utils/text_utils.js';
|
|
@@ -20,7 +20,12 @@ import {type LiveLocation, type LiveLocationPool, LiveLocationWithPool} from './
|
|
|
20
20
|
import {NetworkProject} from './NetworkProject.js';
|
|
21
21
|
import type {ResourceMapping} from './ResourceMapping.js';
|
|
22
22
|
import {type ResourceScriptFile, ResourceScriptMapping} from './ResourceScriptMapping.js';
|
|
23
|
-
import {
|
|
23
|
+
import {
|
|
24
|
+
type SymbolizedError,
|
|
25
|
+
SymbolizedErrorObject,
|
|
26
|
+
SymbolizedSyntaxError,
|
|
27
|
+
UnparsableError
|
|
28
|
+
} from './SymbolizedError.js';
|
|
24
29
|
|
|
25
30
|
export class DebuggerWorkspaceBinding implements SDK.TargetManager.SDKModelObserver<SDK.DebuggerModel.DebuggerModel> {
|
|
26
31
|
readonly resourceMapping: ResourceMapping;
|
|
@@ -206,7 +211,7 @@ export class DebuggerWorkspaceBinding implements SDK.TargetManager.SDKModelObser
|
|
|
206
211
|
|
|
207
212
|
async createStackTraceFromErrorStackLikeString(
|
|
208
213
|
target: SDK.Target.Target, stack: string,
|
|
209
|
-
exceptionDetails?: Protocol.Runtime.ExceptionDetails): Promise<StackTrace.StackTrace.ParsedErrorStackTrace> {
|
|
214
|
+
exceptionDetails?: Protocol.Runtime.ExceptionDetails): Promise<StackTrace.StackTrace.ParsedErrorStackTrace|null> {
|
|
210
215
|
const model =
|
|
211
216
|
target.model(StackTraceImpl.StackTraceModel.StackTraceModel) as StackTraceImpl.StackTraceModel.StackTraceModel;
|
|
212
217
|
const stackTracePromise =
|
|
@@ -215,24 +220,54 @@ export class DebuggerWorkspaceBinding implements SDK.TargetManager.SDKModelObser
|
|
|
215
220
|
return await stackTracePromise;
|
|
216
221
|
}
|
|
217
222
|
|
|
218
|
-
async createSymbolizedError(
|
|
219
|
-
|
|
223
|
+
async createSymbolizedError(
|
|
224
|
+
remoteObject: SDK.RemoteObject.RemoteObject,
|
|
225
|
+
exceptionDetails?: Protocol.Runtime.ExceptionDetails): Promise<SymbolizedError|null> {
|
|
226
|
+
let errorStack = '';
|
|
227
|
+
let causeRemoteObject: SDK.RemoteObject.RemoteObject|undefined;
|
|
228
|
+
let fetchedExceptionDetails = exceptionDetails;
|
|
229
|
+
|
|
230
|
+
if (remoteObject.subtype === 'error') {
|
|
231
|
+
const remoteError = SDK.RemoteObject.RemoteError.objectAsError(remoteObject);
|
|
232
|
+
errorStack = remoteError.errorStack;
|
|
233
|
+
|
|
234
|
+
const [details, causeRemote] = await Promise.all([
|
|
235
|
+
exceptionDetails ? Promise.resolve(exceptionDetails) : remoteError.exceptionDetails(),
|
|
236
|
+
remoteError.cause(),
|
|
237
|
+
]);
|
|
238
|
+
fetchedExceptionDetails = details;
|
|
239
|
+
causeRemoteObject = causeRemote;
|
|
240
|
+
|
|
241
|
+
if (remoteObject.className === 'SyntaxError' && fetchedExceptionDetails) {
|
|
242
|
+
const syntaxError = await SymbolizedSyntaxError.fromExceptionDetails(
|
|
243
|
+
remoteObject.runtimeModel().target(), this, fetchedExceptionDetails);
|
|
244
|
+
if (syntaxError) {
|
|
245
|
+
return syntaxError;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
} else if (remoteObject.type === 'string') {
|
|
249
|
+
errorStack = remoteObject.description || '';
|
|
250
|
+
} else {
|
|
220
251
|
return null;
|
|
221
252
|
}
|
|
222
253
|
|
|
223
|
-
const remoteError = SDK.RemoteObject.RemoteError.objectAsError(remoteObject);
|
|
224
|
-
const [exceptionDetails, causeRemoteObject] = await Promise.all([
|
|
225
|
-
remoteError.exceptionDetails(),
|
|
226
|
-
remoteError.cause(),
|
|
227
|
-
]);
|
|
228
|
-
|
|
229
254
|
const [stackTrace, cause] = await Promise.all([
|
|
230
255
|
this.createStackTraceFromErrorStackLikeString(
|
|
231
|
-
remoteObject.runtimeModel().target(),
|
|
256
|
+
remoteObject.runtimeModel().target(), errorStack, fetchedExceptionDetails),
|
|
232
257
|
causeRemoteObject ? this.createSymbolizedError(causeRemoteObject) : Promise.resolve(null),
|
|
233
258
|
]);
|
|
234
259
|
|
|
235
|
-
|
|
260
|
+
const issueSummary = fetchedExceptionDetails?.exceptionMetaData?.issueSummary;
|
|
261
|
+
if (typeof issueSummary === 'string') {
|
|
262
|
+
errorStack = StackTrace.ErrorStackParser.concatErrorDescriptionAndIssueSummary(errorStack, issueSummary);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
if (!stackTrace) {
|
|
266
|
+
return new UnparsableError(errorStack, cause);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
const message = StackTraceImpl.DetailedErrorStackParser.parseMessage(errorStack);
|
|
270
|
+
return new SymbolizedErrorObject(message, stackTrace, cause);
|
|
236
271
|
}
|
|
237
272
|
|
|
238
273
|
async createLiveLocation(
|
|
@@ -2,19 +2,106 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import * as Common from '../../core/common/common.js';
|
|
6
|
+
import * as SDK from '../../core/sdk/sdk.js';
|
|
7
|
+
import type * as Protocol from '../../generated/protocol.js';
|
|
8
|
+
import * as StackTrace from '../stack_trace/stack_trace.js';
|
|
9
|
+
import type * as Workspace from '../workspace/workspace.js';
|
|
7
10
|
|
|
8
|
-
|
|
9
|
-
|
|
11
|
+
import type {DebuggerWorkspaceBinding} from './DebuggerWorkspaceBinding.js';
|
|
12
|
+
import {type LiveLocation, LiveLocationPool} from './LiveLocation.js';
|
|
13
|
+
|
|
14
|
+
export type SymbolizedError = SymbolizedErrorObject|SymbolizedSyntaxError|UnparsableError;
|
|
15
|
+
|
|
16
|
+
export class UnparsableError extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
|
17
|
+
readonly errorStack: string;
|
|
18
|
+
readonly cause: SymbolizedError|null;
|
|
19
|
+
|
|
20
|
+
constructor(errorStack: string, cause: SymbolizedError|null) {
|
|
21
|
+
super();
|
|
22
|
+
this.errorStack = errorStack;
|
|
23
|
+
this.cause = cause;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export class SymbolizedErrorObject extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
|
28
|
+
readonly message: string;
|
|
10
29
|
readonly stackTrace: StackTrace.StackTrace.ParsedErrorStackTrace;
|
|
11
30
|
readonly cause: SymbolizedError|null;
|
|
12
31
|
|
|
13
|
-
constructor(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
this.remoteError = remoteError;
|
|
32
|
+
constructor(message: string, stackTrace: StackTrace.StackTrace.ParsedErrorStackTrace, cause: SymbolizedError|null) {
|
|
33
|
+
super();
|
|
34
|
+
this.message = message;
|
|
17
35
|
this.stackTrace = stackTrace;
|
|
18
36
|
this.cause = cause;
|
|
37
|
+
|
|
38
|
+
this.stackTrace.addEventListener(StackTrace.StackTrace.Events.UPDATED, this.#fireUpdated, this);
|
|
39
|
+
this.cause?.addEventListener(Events.UPDATED, this.#fireUpdated, this);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
dispose(): void {
|
|
43
|
+
this.stackTrace.removeEventListener(StackTrace.StackTrace.Events.UPDATED, this.#fireUpdated, this);
|
|
44
|
+
this.cause?.removeEventListener(Events.UPDATED, this.#fireUpdated, this);
|
|
45
|
+
if (this.cause instanceof SymbolizedErrorObject) {
|
|
46
|
+
this.cause.dispose();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
#fireUpdated(): void {
|
|
51
|
+
this.dispatchEventToListeners(Events.UPDATED);
|
|
19
52
|
}
|
|
20
53
|
}
|
|
54
|
+
|
|
55
|
+
export class SymbolizedSyntaxError extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
|
56
|
+
readonly message: string;
|
|
57
|
+
#uiLocation: Workspace.UISourceCode.UILocation|null = null;
|
|
58
|
+
|
|
59
|
+
constructor(message: string) {
|
|
60
|
+
super();
|
|
61
|
+
this.message = message;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
get uiLocation(): Workspace.UISourceCode.UILocation|null {
|
|
65
|
+
return this.#uiLocation;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
static async fromExceptionDetails(
|
|
69
|
+
target: SDK.Target.Target, debuggerWorkspaceBinding: DebuggerWorkspaceBinding,
|
|
70
|
+
exceptionDetails: Protocol.Runtime.ExceptionDetails): Promise<SymbolizedSyntaxError|null> {
|
|
71
|
+
const {exception, scriptId, lineNumber, columnNumber} = exceptionDetails;
|
|
72
|
+
if (!exception || exception.subtype !== 'error' || exception.className !== 'SyntaxError') {
|
|
73
|
+
throw new Error('SymbolizedSyntaxError.fromExceptionDetails expects a SyntaxError');
|
|
74
|
+
}
|
|
75
|
+
if (!scriptId) {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const debuggerModel = target.model(SDK.DebuggerModel.DebuggerModel);
|
|
80
|
+
if (!debuggerModel) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const rawLocation = debuggerModel.createRawLocationByScriptId(scriptId, lineNumber, columnNumber);
|
|
85
|
+
const symbolizedSyntaxError = new SymbolizedSyntaxError(exception.description || '');
|
|
86
|
+
|
|
87
|
+
// We don't implement dispose here. We won't create many of these so a couple
|
|
88
|
+
// LiveLocationPools and SymbolizedSyntaxError instances leaking is fine.
|
|
89
|
+
await debuggerWorkspaceBinding.createLiveLocation(
|
|
90
|
+
rawLocation, symbolizedSyntaxError.#update.bind(symbolizedSyntaxError), new LiveLocationPool());
|
|
91
|
+
|
|
92
|
+
return symbolizedSyntaxError;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
async #update(liveLocation: LiveLocation): Promise<void> {
|
|
96
|
+
this.#uiLocation = await liveLocation.uiLocation();
|
|
97
|
+
this.dispatchEventToListeners(Events.UPDATED);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export const enum Events {
|
|
102
|
+
UPDATED = 'UPDATED',
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface EventTypes {
|
|
106
|
+
[Events.UPDATED]: void;
|
|
107
|
+
}
|
|
@@ -634,7 +634,9 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
634
634
|
screenHeight >= screenWidth ? Protocol.Emulation.ScreenOrientationType.PortraitPrimary :
|
|
635
635
|
Protocol.Emulation.ScreenOrientationType.LandscapePrimary,
|
|
636
636
|
resetPageScaleFactor);
|
|
637
|
-
this.applyUserAgent(
|
|
637
|
+
this.applyUserAgent(
|
|
638
|
+
mobile ? DeviceModeModel.defaultMobileUserAgent() : '',
|
|
639
|
+
mobile ? DeviceModeModel.defaultMobileUserAgentMetadata() : null);
|
|
638
640
|
this.applyTouch(
|
|
639
641
|
this.#uaSetting.get() === UA.DESKTOP_TOUCH || this.#uaSetting.get() === UA.MOBILE,
|
|
640
642
|
this.#uaSetting.get() === UA.MOBILE);
|
|
@@ -872,6 +874,45 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
872
874
|
maskLength: (this.#mode.orientation === VerticalSpanned) ? hinge.width : hinge.height,
|
|
873
875
|
};
|
|
874
876
|
}
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* Heuristic to keep the default mobile User Agent fresh and aligned with the adoption bell curve.
|
|
880
|
+
* Android: We target N-1 versions (where N is the latest) to represent the plurality of global users.
|
|
881
|
+
* iOS: We follow the calendar year (starting from the 2025 shift to year-based versioning).
|
|
882
|
+
* Data sources:
|
|
883
|
+
* - StatCounter Global Stats: https://gs.statcounter.com/os-version-market-share/android
|
|
884
|
+
* - Android adoption typically lags by ~12-18 months for plurality.
|
|
885
|
+
* - iOS adoption typically reaches majority within ~3-6 months.
|
|
886
|
+
*/
|
|
887
|
+
static getDynamicMobileUA(): {userAgent: string, metadata: Protocol.Emulation.UserAgentMetadata} {
|
|
888
|
+
const now = new Date();
|
|
889
|
+
const year = now.getFullYear();
|
|
890
|
+
const isLateInYear = now.getMonth() >= 9; // Oct, Nov, Dec
|
|
891
|
+
|
|
892
|
+
// Android: Released in late summer/fall. plurality is usually Year - 2011 (e.g. Android 15 in early 2026).
|
|
893
|
+
const androidVersion = isLateInYear ? (year - 2010) : (year - 2011);
|
|
894
|
+
const pixelModel = isLateInYear ? (year - 2016) : (year - 2017);
|
|
895
|
+
|
|
896
|
+
const ua = `Mozilla/5.0 (Linux; Android ${androidVersion}; Pixel ${
|
|
897
|
+
pixelModel}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36`;
|
|
898
|
+
const metadata = {
|
|
899
|
+
platform: 'Android',
|
|
900
|
+
platformVersion: androidVersion.toString(),
|
|
901
|
+
architecture: '',
|
|
902
|
+
model: `Pixel ${pixelModel}`,
|
|
903
|
+
mobile: true,
|
|
904
|
+
};
|
|
905
|
+
return {userAgent: ua, metadata};
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
static defaultMobileUserAgent(): string {
|
|
909
|
+
return SDK.NetworkManager.MultitargetNetworkManager.patchUserAgentWithChromeVersion(
|
|
910
|
+
DeviceModeModel.getDynamicMobileUA().userAgent);
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
static defaultMobileUserAgentMetadata(): Protocol.Emulation.UserAgentMetadata {
|
|
914
|
+
return DeviceModeModel.getDynamicMobileUA().metadata;
|
|
915
|
+
}
|
|
875
916
|
}
|
|
876
917
|
|
|
877
918
|
export class Insets {
|
|
@@ -937,16 +978,4 @@ export const MinDeviceScaleFactor = 0;
|
|
|
937
978
|
export const MaxDeviceScaleFactor = 10;
|
|
938
979
|
export const MaxDeviceNameLength = 50;
|
|
939
980
|
|
|
940
|
-
const mobileUserAgent =
|
|
941
|
-
'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36';
|
|
942
|
-
const defaultMobileUserAgent =
|
|
943
|
-
SDK.NetworkManager.MultitargetNetworkManager.patchUserAgentWithChromeVersion(mobileUserAgent);
|
|
944
|
-
|
|
945
|
-
const defaultMobileUserAgentMetadata = {
|
|
946
|
-
platform: 'Android',
|
|
947
|
-
platformVersion: '6.0',
|
|
948
|
-
architecture: '',
|
|
949
|
-
model: 'Nexus 5',
|
|
950
|
-
mobile: true,
|
|
951
|
-
};
|
|
952
981
|
export const defaultMobileScaleFactor = 2;
|
|
@@ -793,7 +793,7 @@ const emulatedDevices = [
|
|
|
793
793
|
'user-agent':
|
|
794
794
|
'Mozilla/5.0 (Linux; Android 13; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36',
|
|
795
795
|
'user-agent-metadata':
|
|
796
|
-
{'platform': 'Android', 'platformVersion': '13', 'architecture': '', 'model': 'Pixel
|
|
796
|
+
{'platform': 'Android', 'platformVersion': '13', 'architecture': '', 'model': 'Pixel 7', 'mobile': true},
|
|
797
797
|
'type': 'phone',
|
|
798
798
|
},
|
|
799
799
|
{
|
|
@@ -435,12 +435,11 @@ export class IssuesManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
|
|
|
435
435
|
// In case a user wants to hide a specific issue, the issue code is added to "code" section
|
|
436
436
|
// of our setting and its value is set to IssueStatus.Hidden. Then issue then gets hidden.
|
|
437
437
|
if (values?.[code]) {
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
438
|
+
const isHidden = values[code] === IssueStatus.HIDDEN;
|
|
439
|
+
if (issue.isHidden() !== isHidden) {
|
|
440
|
+
issue.setHidden(isHidden);
|
|
441
|
+
this.dispatchEventToListeners(Events.ISSUE_HIDDEN_STATUS_UPDATED, {issue});
|
|
441
442
|
}
|
|
442
|
-
issue.setHidden(false);
|
|
443
|
-
return;
|
|
444
443
|
}
|
|
445
444
|
}
|
|
446
445
|
|
|
@@ -471,7 +470,10 @@ export class IssuesManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
|
|
|
471
470
|
|
|
472
471
|
unhideAllIssues(): void {
|
|
473
472
|
for (const issue of this.#allIssues.values()) {
|
|
474
|
-
issue.
|
|
473
|
+
if (issue.isHidden()) {
|
|
474
|
+
issue.setHidden(false);
|
|
475
|
+
this.dispatchEventToListeners(Events.ISSUE_HIDDEN_STATUS_UPDATED, {issue});
|
|
476
|
+
}
|
|
475
477
|
}
|
|
476
478
|
this.hideIssueSetting?.set(defaultHideIssueByCodeSetting());
|
|
477
479
|
}
|
|
@@ -486,10 +488,15 @@ export interface IssueAddedEvent {
|
|
|
486
488
|
issue: Issue;
|
|
487
489
|
}
|
|
488
490
|
|
|
491
|
+
export interface IssueHiddenStatusUpdatedEvent {
|
|
492
|
+
issue: Issue;
|
|
493
|
+
}
|
|
494
|
+
|
|
489
495
|
export interface EventTypes {
|
|
490
496
|
[Events.ISSUES_COUNT_UPDATED]: void;
|
|
491
497
|
[Events.FULL_UPDATE_REQUIRED]: void;
|
|
492
498
|
[Events.ISSUE_ADDED]: IssueAddedEvent;
|
|
499
|
+
[Events.ISSUE_HIDDEN_STATUS_UPDATED]: IssueHiddenStatusUpdatedEvent;
|
|
493
500
|
}
|
|
494
501
|
|
|
495
502
|
// @ts-expect-error
|
|
@@ -8339,7 +8339,7 @@ export const NativeFunctions = [
|
|
|
8339
8339
|
},
|
|
8340
8340
|
{
|
|
8341
8341
|
name: "setConstraints",
|
|
8342
|
-
signatures: [["constraints"]]
|
|
8342
|
+
signatures: [["?constraints"]]
|
|
8343
8343
|
},
|
|
8344
8344
|
{
|
|
8345
8345
|
name: "createContext",
|
|
@@ -9353,7 +9353,7 @@ export const NativeFunctions = [
|
|
|
9353
9353
|
},
|
|
9354
9354
|
{
|
|
9355
9355
|
name: "copyElementImageToTexture",
|
|
9356
|
-
signatures: [["source","destination"],["source","width","height","destination"],["source","sx","sy","swidth","sheight","destination"]]
|
|
9356
|
+
signatures: [["source","destination"],["source","width","height","destination"],["source","sx","sy","swidth","sheight","destination"],["source","sx","sy","swidth","sheight","width","height","destination"]]
|
|
9357
9357
|
},
|
|
9358
9358
|
{
|
|
9359
9359
|
name: "multiDrawIndirect",
|
|
@@ -8,19 +8,34 @@ import type * as Protocol from '../../generated/protocol.js';
|
|
|
8
8
|
|
|
9
9
|
import type {RawFrame} from './Trie.js';
|
|
10
10
|
|
|
11
|
+
const CALL_FRAME_REGEX = /^\s*at\s+/;
|
|
12
|
+
|
|
11
13
|
/**
|
|
12
14
|
* Takes a V8 Error#stack string and extracts structured information.
|
|
15
|
+
*
|
|
16
|
+
* @returns Null if the provided string has an unexpected format. A
|
|
17
|
+
* populated `RawFrame[]` otherwise.
|
|
13
18
|
*/
|
|
14
|
-
export function parseRawFramesFromErrorStack(stack: string): RawFrame[] {
|
|
19
|
+
export function parseRawFramesFromErrorStack(stack: string): RawFrame[]|null {
|
|
15
20
|
const lines = stack.split('\n');
|
|
21
|
+
const firstAtLineIndex = findFramesStartLine(lines);
|
|
16
22
|
const rawFrames: RawFrame[] = [];
|
|
17
|
-
|
|
18
|
-
|
|
23
|
+
|
|
24
|
+
if (firstAtLineIndex === -1) {
|
|
25
|
+
return rawFrames;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
for (let i = firstAtLineIndex; i < lines.length; ++i) {
|
|
29
|
+
const line = lines[i];
|
|
30
|
+
const match = CALL_FRAME_REGEX.exec(line);
|
|
19
31
|
if (!match) {
|
|
20
|
-
|
|
32
|
+
if (line.trim() === '') {
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
return null;
|
|
21
36
|
}
|
|
22
37
|
|
|
23
|
-
let lineContent = match[
|
|
38
|
+
let lineContent = line.substring(match[0].length);
|
|
24
39
|
let isAsync = false;
|
|
25
40
|
if (lineContent.startsWith('async ')) {
|
|
26
41
|
isAsync = true;
|
|
@@ -71,15 +86,17 @@ export function parseRawFramesFromErrorStack(stack: string): RawFrame[] {
|
|
|
71
86
|
if (innerOpenParen !== -1) {
|
|
72
87
|
evalFunctionName = evalOriginStr.substring(0, innerOpenParen).trim();
|
|
73
88
|
evalLocation = evalOriginStr.substring(innerOpenParen + 2, evalOriginStr.length - 1);
|
|
74
|
-
evalOrigin = parseRawFramesFromErrorStack(` at ${evalFunctionName} (${evalLocation})`)[0];
|
|
89
|
+
evalOrigin = parseRawFramesFromErrorStack(` at ${evalFunctionName} (${evalLocation})`)?.[0];
|
|
75
90
|
} else {
|
|
76
|
-
evalOrigin = parseRawFramesFromErrorStack(` at ${evalFunctionName}`)[0];
|
|
91
|
+
evalOrigin = parseRawFramesFromErrorStack(` at ${evalFunctionName}`)?.[0];
|
|
77
92
|
}
|
|
78
93
|
}
|
|
79
94
|
|
|
80
95
|
if (location.startsWith('index ')) {
|
|
81
96
|
promiseIndex = parseInt(location.substring(6), 10);
|
|
82
97
|
url = '';
|
|
98
|
+
} else if (location === '<anonymous>' || location === 'native') {
|
|
99
|
+
url = '';
|
|
83
100
|
} else if (location.includes(':wasm-function[')) {
|
|
84
101
|
isWasm = true;
|
|
85
102
|
const wasmMatch = /^(.*):wasm-function\[(\d+)\]:(0x[0-9a-fA-F]+)$/.exec(location);
|
|
@@ -142,6 +159,20 @@ export function parseRawFramesFromErrorStack(stack: string): RawFrame[] {
|
|
|
142
159
|
return rawFrames;
|
|
143
160
|
}
|
|
144
161
|
|
|
162
|
+
function findFramesStartLine(lines: string[]): number {
|
|
163
|
+
return lines.findIndex(line => CALL_FRAME_REGEX.test(line));
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export function parseMessage(stack: string): string {
|
|
167
|
+
const lines = stack.split('\n');
|
|
168
|
+
const firstAtLineIndex = findFramesStartLine(lines);
|
|
169
|
+
|
|
170
|
+
if (firstAtLineIndex !== -1) {
|
|
171
|
+
return lines.slice(0, firstAtLineIndex).join('\n');
|
|
172
|
+
}
|
|
173
|
+
return stack;
|
|
174
|
+
}
|
|
175
|
+
|
|
145
176
|
/**
|
|
146
177
|
* Error#stack output only contains script URLs. In some cases we are able to
|
|
147
178
|
* retrieve additional exception details from V8 that we can use to augment
|
|
@@ -150,9 +181,17 @@ export function parseRawFramesFromErrorStack(stack: string): RawFrame[] {
|
|
|
150
181
|
export function augmentRawFramesWithScriptIds(
|
|
151
182
|
rawFrames: RawFrame[], protocolStackTrace: Protocol.Runtime.StackTrace): void {
|
|
152
183
|
for (const rawFrame of rawFrames) {
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
|
|
184
|
+
const isWasm = rawFrame.parsedFrameInfo?.isWasm;
|
|
185
|
+
const protocolFrame = protocolStackTrace.callFrames.find(frame => {
|
|
186
|
+
if (isWasm) {
|
|
187
|
+
// The parser parses Wasm offsets into the `columnNumber` field. The `lineNumber` is always -1.
|
|
188
|
+
// In the protocol trace, the `lineNumber` is 0 (for Wasm) and `columnNumber` is the bytecode offset.
|
|
189
|
+
return rawFrame.url === frame.url && rawFrame.columnNumber === frame.columnNumber;
|
|
190
|
+
}
|
|
191
|
+
return rawFrame.url === frame.url && rawFrame.lineNumber === frame.lineNumber &&
|
|
192
|
+
rawFrame.columnNumber === frame.columnNumber;
|
|
193
|
+
});
|
|
194
|
+
|
|
156
195
|
if (protocolFrame) {
|
|
157
196
|
// @ts-expect-error scriptId is a readonly property.
|
|
158
197
|
rawFrame.scriptId = protocolFrame.scriptId;
|
|
@@ -21,6 +21,24 @@ export interface ParsedErrorFrame {
|
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Combines the error description (essentially the `Error#stack` property value)
|
|
26
|
+
* with the `issueSummary`.
|
|
27
|
+
*
|
|
28
|
+
* @param description the `description` property of the `Error` remote object.
|
|
29
|
+
* @param issueSummary the optional `issueSummary` of the `exceptionMetaData`.
|
|
30
|
+
* @returns the enriched description.
|
|
31
|
+
* @see https://goo.gle/devtools-reduce-network-noise-design
|
|
32
|
+
*/
|
|
33
|
+
export function concatErrorDescriptionAndIssueSummary(description: string, issueSummary: string): string {
|
|
34
|
+
// Insert the issue summary right after the error message.
|
|
35
|
+
const pos = description.indexOf('\n');
|
|
36
|
+
const prefix = pos === -1 ? description : description.substring(0, pos);
|
|
37
|
+
const suffix = pos === -1 ? '' : description.substring(pos);
|
|
38
|
+
description = `${prefix}. ${issueSummary}${suffix}`;
|
|
39
|
+
return description;
|
|
40
|
+
}
|
|
41
|
+
|
|
24
42
|
/**
|
|
25
43
|
* Takes a V8 Error#stack string and extracts source position information.
|
|
26
44
|
*
|
|
@@ -58,8 +58,12 @@ export class StackTraceModel extends SDK.SDKModel.SDKModel<unknown> {
|
|
|
58
58
|
|
|
59
59
|
async createFromErrorStackLikeString(
|
|
60
60
|
stack: string, rawFramesToUIFrames: TranslateRawFrames,
|
|
61
|
-
exceptionDetails?: Protocol.Runtime.ExceptionDetails): Promise<StackTrace.StackTrace.ParsedErrorStackTrace> {
|
|
61
|
+
exceptionDetails?: Protocol.Runtime.ExceptionDetails): Promise<StackTrace.StackTrace.ParsedErrorStackTrace|null> {
|
|
62
62
|
const rawFrames = parseRawFramesFromErrorStack(stack);
|
|
63
|
+
if (!rawFrames) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
|
|
63
67
|
if (exceptionDetails?.stackTrace) {
|
|
64
68
|
augmentRawFramesWithScriptIds(rawFrames, exceptionDetails.stackTrace);
|
|
65
69
|
}
|
|
@@ -2,11 +2,23 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
+
import * as Common from '../../core/common/common.js';
|
|
5
6
|
import * as Platform from '../../core/platform/platform.js';
|
|
6
7
|
|
|
7
|
-
import {
|
|
8
|
+
import {contentAsDataURL, type DeferredContent} from './ContentProvider.js';
|
|
8
9
|
import {Text} from './Text.js';
|
|
9
10
|
|
|
11
|
+
const objectUrlRegistry = new FinalizationRegistry<string>(url => {
|
|
12
|
+
URL.revokeObjectURL(url);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The maximum size in bytes that we are willing to convert to a Blob.
|
|
17
|
+
* 10MB is chosen as a safe upper limit to prevent freezing the DevTools UI
|
|
18
|
+
* when synchronously decoding large Base64 strings.
|
|
19
|
+
*/
|
|
20
|
+
const MAX_BLOB_SIZE_BYTES = 10 * 1024 * 1024;
|
|
21
|
+
|
|
10
22
|
/**
|
|
11
23
|
* This class is a small wrapper around either raw binary or text data.
|
|
12
24
|
* As the binary data can actually contain textual data, we also store the
|
|
@@ -26,11 +38,10 @@ import {Text} from './Text.js';
|
|
|
26
38
|
export class ContentData {
|
|
27
39
|
readonly mimeType: string;
|
|
28
40
|
readonly charset: string;
|
|
29
|
-
|
|
30
41
|
#contentAsBase64?: string;
|
|
31
42
|
#contentAsText?: string;
|
|
32
|
-
|
|
33
43
|
#contentAsTextObj?: Text;
|
|
44
|
+
#imagePreviewUrl?: string;
|
|
34
45
|
|
|
35
46
|
constructor(data: string, isBase64: boolean, mimeType: string, charset?: string) {
|
|
36
47
|
this.charset = charset || 'utf-8';
|
|
@@ -75,13 +86,7 @@ export class ContentData {
|
|
|
75
86
|
throw new Error('Cannot interpret binary data as text');
|
|
76
87
|
}
|
|
77
88
|
|
|
78
|
-
const
|
|
79
|
-
const len = binaryString.length;
|
|
80
|
-
const bytes = new Uint8Array(len);
|
|
81
|
-
for (let i = 0; i < len; i++) {
|
|
82
|
-
bytes[i] = binaryString.charCodeAt(i);
|
|
83
|
-
}
|
|
84
|
-
|
|
89
|
+
const bytes = Common.Base64.decode(this.#contentAsBase64 as string);
|
|
85
90
|
this.#contentAsText = new TextDecoder(this.charset).decode(bytes);
|
|
86
91
|
return this.#contentAsText;
|
|
87
92
|
}
|
|
@@ -145,6 +150,62 @@ export class ContentData {
|
|
|
145
150
|
return contentAsDataURL(this.text, this.mimeType ?? '', false, 'utf-8');
|
|
146
151
|
}
|
|
147
152
|
|
|
153
|
+
/**
|
|
154
|
+
* Returns the content as a Blob.
|
|
155
|
+
*
|
|
156
|
+
* We prefer Base64 as the source for the Blob because it represents the raw binary
|
|
157
|
+
* bytes. Converting binary data (like an image) to a UTF-16 string (contentAsText)
|
|
158
|
+
* is destructive and will corrupt the image data.
|
|
159
|
+
*
|
|
160
|
+
* @returns The Blob representation, or `null` if the content exceeds the 10MB safety limit.
|
|
161
|
+
*/
|
|
162
|
+
asBlob(): Blob|null {
|
|
163
|
+
// We prefer Base64 as the source for the Blob because it represents the raw binary
|
|
164
|
+
// bytes. Converting binary data (like an image) to a UTF-16 string (contentAsText)
|
|
165
|
+
// is destructive and will corrupt the image data.
|
|
166
|
+
if (this.#contentAsBase64 !== undefined) {
|
|
167
|
+
// Base64 encoding uses 4 characters to represent 3 bytes of data.
|
|
168
|
+
// Therefore, the byte size is approximately 75% of the string length.
|
|
169
|
+
if (this.#contentAsBase64.length * 0.75 > MAX_BLOB_SIZE_BYTES) {
|
|
170
|
+
return null;
|
|
171
|
+
}
|
|
172
|
+
const bytes = Common.Base64.decode(this.#contentAsBase64);
|
|
173
|
+
return new Blob([bytes], {type: this.mimeType});
|
|
174
|
+
}
|
|
175
|
+
const text = this.#contentAsText ?? '';
|
|
176
|
+
if (text.length > MAX_BLOB_SIZE_BYTES) {
|
|
177
|
+
return null;
|
|
178
|
+
}
|
|
179
|
+
return new Blob([text], {type: this.mimeType});
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Gets the image as either a data: or blob: URL.
|
|
184
|
+
*
|
|
185
|
+
* We prefer data: for simplicity, but these are limited in size to 1MB. If
|
|
186
|
+
* the resource is >1MB, we fall back to a blob: URL.
|
|
187
|
+
*
|
|
188
|
+
* @returns An object URL, or `null` if the content exceeds the 10MB safety limit.
|
|
189
|
+
*/
|
|
190
|
+
asImagePreviewUrl(): string|null {
|
|
191
|
+
if (this.#imagePreviewUrl) {
|
|
192
|
+
return this.#imagePreviewUrl;
|
|
193
|
+
}
|
|
194
|
+
const url = this.asDataUrl();
|
|
195
|
+
if (url !== null) {
|
|
196
|
+
this.#imagePreviewUrl = url;
|
|
197
|
+
return this.#imagePreviewUrl;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
const blob = this.asBlob();
|
|
201
|
+
if (blob === null) {
|
|
202
|
+
return null;
|
|
203
|
+
}
|
|
204
|
+
this.#imagePreviewUrl = URL.createObjectURL(blob);
|
|
205
|
+
objectUrlRegistry.register(this, this.#imagePreviewUrl);
|
|
206
|
+
return this.#imagePreviewUrl;
|
|
207
|
+
}
|
|
208
|
+
|
|
148
209
|
/**
|
|
149
210
|
* @deprecated Used during migration from `DeferredContent` to `ContentData`.
|
|
150
211
|
*/
|
|
@@ -14,6 +14,13 @@ export interface TraceFile {
|
|
|
14
14
|
metadata: MetaData;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
// When a file is imported, it could have come from another tool which does not
|
|
18
|
+
// define metadata.
|
|
19
|
+
interface TraceFileWithUnknownMetadata {
|
|
20
|
+
traceEvents: readonly Event[];
|
|
21
|
+
metadata?: MetaData;
|
|
22
|
+
}
|
|
23
|
+
|
|
17
24
|
export interface Breadcrumb {
|
|
18
25
|
window: TraceWindowMicro;
|
|
19
26
|
child: Breadcrumb|null;
|
|
@@ -239,7 +246,7 @@ export interface MetadataResource {
|
|
|
239
246
|
mimeType: string;
|
|
240
247
|
}
|
|
241
248
|
|
|
242
|
-
export type Contents =
|
|
249
|
+
export type Contents = TraceFileWithUnknownMetadata|Event[];
|
|
243
250
|
|
|
244
251
|
export function traceEventKeyToValues(key: SerializableKey): SerializableKeyValues {
|
|
245
252
|
const parts = key.split('-');
|