chrome-devtools-frontend 1.0.1512349 → 1.0.1513662
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/docs/cookbook/release_management.md +15 -13
- package/docs/get_the_code.md +114 -35
- package/front_end/core/common/Color.ts +40 -44
- package/front_end/core/common/Console.ts +4 -4
- package/front_end/core/common/ParsedURL.ts +14 -14
- package/front_end/core/common/ResourceType.ts +20 -20
- package/front_end/core/common/SegmentedRange.ts +13 -14
- package/front_end/core/common/Settings.ts +4 -4
- package/front_end/core/common/StringOutputStream.ts +4 -4
- package/front_end/core/host/GdpClient.ts +38 -0
- package/front_end/core/host/InspectorFrontendHost.ts +4 -1
- package/front_end/core/host/InspectorFrontendHostAPI.ts +2 -0
- package/front_end/core/host/ResourceLoader.ts +2 -2
- package/front_end/core/host/UserMetrics.ts +0 -2
- package/front_end/core/protocol_client/InspectorBackend.ts +9 -9
- package/front_end/core/root/Runtime.ts +5 -2
- package/front_end/core/sdk/AccessibilityModel.ts +48 -48
- package/front_end/core/sdk/AnimationModel.ts +78 -79
- package/front_end/core/sdk/CPUProfilerModel.ts +5 -5
- package/front_end/core/sdk/CPUThrottlingManager.ts +17 -17
- package/front_end/core/sdk/CSSMatchedStyles.ts +44 -44
- package/front_end/core/sdk/CSSMedia.ts +22 -22
- package/front_end/core/sdk/CSSModel.ts +4 -4
- package/front_end/core/sdk/CSSProperty.ts +9 -9
- package/front_end/core/sdk/CSSPropertyParser.ts +1 -2
- package/front_end/core/sdk/CSSRule.ts +3 -3
- package/front_end/core/sdk/CSSStyleDeclaration.ts +27 -28
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +13 -13
- package/front_end/core/sdk/CategorizedBreakpoint.ts +4 -4
- package/front_end/core/sdk/ChildTargetManager.ts +6 -6
- package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +4 -4
- package/front_end/core/sdk/ConsoleModel.ts +24 -24
- package/front_end/core/sdk/Cookie.ts +16 -16
- package/front_end/core/sdk/CookieParser.ts +6 -6
- package/front_end/core/sdk/DOMDebuggerModel.ts +88 -89
- package/front_end/core/sdk/DOMModel.ts +113 -113
- package/front_end/core/sdk/DebuggerModel.ts +102 -103
- package/front_end/core/sdk/EmulationModel.ts +6 -6
- package/front_end/core/sdk/EventBreakpointsModel.ts +5 -5
- package/front_end/core/sdk/HeapProfilerModel.ts +5 -5
- package/front_end/core/sdk/IsolateManager.ts +26 -26
- package/front_end/core/sdk/LayerTreeBase.ts +29 -30
- package/front_end/core/sdk/OverlayModel.ts +6 -6
- package/front_end/core/sdk/Resource.ts +43 -43
- package/front_end/core/sdk/ResourceTreeModel.ts +58 -61
- package/front_end/core/sdk/RuntimeModel.ts +12 -13
- package/front_end/core/sdk/SDKModel.ts +3 -3
- package/front_end/core/sdk/Script.ts +17 -17
- package/front_end/core/sdk/SecurityOriginManager.ts +14 -14
- package/front_end/core/sdk/ServerTiming.ts +2 -2
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +15 -15
- package/front_end/core/sdk/ServiceWorkerManager.ts +19 -24
- package/front_end/core/sdk/SourceMap.ts +10 -10
- package/front_end/core/sdk/StorageKeyManager.ts +12 -12
- package/front_end/core/sdk/Target.ts +33 -34
- package/front_end/core/sdk/TargetManager.ts +20 -20
- package/front_end/entrypoints/formatter_worker/AcornTokenizer.ts +8 -8
- package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +7 -7
- package/front_end/entrypoints/heap_snapshot_worker/AllocationProfile.ts +7 -7
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +24 -24
- package/front_end/entrypoints/main/GlobalAiButton.ts +3 -3
- package/front_end/entrypoints/main/MainImpl.ts +16 -14
- package/front_end/entrypoints/main/main-meta.ts +1 -2
- package/front_end/generated/InspectorBackendCommands.js +3 -2
- package/front_end/generated/SupportedCSSProperties.js +20 -0
- package/front_end/generated/protocol-mapping.d.ts +4 -0
- package/front_end/generated/protocol-proxy-api.d.ts +5 -0
- package/front_end/generated/protocol.ts +20 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +15 -16
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +127 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +149 -26
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +6 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +9 -10
- package/front_end/models/badges/AiExplorerBadge.ts +21 -0
- package/front_end/models/badges/Badge.ts +3 -5
- package/front_end/models/badges/CodeWhispererBadge.ts +21 -0
- package/front_end/models/badges/DOMDetectiveBadge.ts +4 -3
- package/front_end/models/badges/SpeedsterBadge.ts +6 -4
- package/front_end/models/badges/StarterBadge.ts +4 -3
- package/front_end/models/badges/UserBadges.ts +29 -3
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +6 -6
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +18 -18
- package/front_end/models/bindings/FileUtils.ts +15 -15
- package/front_end/models/bindings/ResourceScriptMapping.ts +14 -14
- package/front_end/models/elements/ElementUpdateRecord.ts +11 -11
- package/front_end/models/emulation/DeviceModeModel.ts +123 -131
- package/front_end/models/emulation/EmulatedDevices.ts +22 -22
- package/front_end/models/extensions/ExtensionPanel.ts +24 -24
- package/front_end/models/extensions/ExtensionServer.ts +4 -4
- package/front_end/models/javascript_metadata/NativeFunctions.js +14 -2
- package/front_end/models/persistence/IsolatedFileSystem.ts +18 -19
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +13 -13
- package/front_end/models/trace/EventsSerializer.ts +5 -5
- package/front_end/models/trace/LanternComputationData.ts +10 -10
- package/front_end/models/trace/ModelImpl.ts +32 -41
- package/front_end/models/trace/Processor.ts +28 -30
- package/front_end/models/trace/extras/FilmStrip.ts +6 -6
- package/front_end/models/trace/extras/StackTraceForEvent.ts +22 -25
- package/front_end/models/trace/extras/ThirdParties.ts +16 -17
- package/front_end/models/trace/extras/TraceFilter.ts +1 -1
- package/front_end/models/trace/handlers/Threads.ts +10 -10
- package/front_end/models/trace/handlers/helpers.ts +9 -9
- package/front_end/models/trace/handlers/types.ts +3 -3
- package/front_end/models/trace/insights/CLSCulprits.ts +12 -14
- package/front_end/models/trace/insights/Cache.ts +8 -4
- package/front_end/models/trace/insights/DOMSize.ts +8 -5
- package/front_end/models/trace/insights/DocumentLatency.ts +2 -2
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +3 -3
- package/front_end/models/trace/insights/FontDisplay.ts +3 -4
- package/front_end/models/trace/insights/ForcedReflow.ts +3 -3
- package/front_end/models/trace/insights/INPBreakdown.ts +2 -2
- package/front_end/models/trace/insights/ImageDelivery.ts +11 -11
- package/front_end/models/trace/insights/LCPBreakdown.ts +4 -4
- package/front_end/models/trace/insights/LCPDiscovery.ts +4 -4
- package/front_end/models/trace/insights/LegacyJavaScript.ts +2 -2
- package/front_end/models/trace/insights/ModernHTTP.ts +4 -5
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +12 -12
- package/front_end/models/trace/insights/RenderBlocking.ts +9 -10
- package/front_end/models/trace/insights/SlowCSSSelector.ts +2 -2
- package/front_end/models/trace/insights/ThirdParties.ts +4 -5
- package/front_end/models/trace/insights/Viewport.ts +8 -5
- package/front_end/models/trace/insights/types.ts +1 -0
- package/front_end/models/trace/lantern/testing/MetricTestUtils.ts +10 -10
- package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +52 -52
- package/front_end/panels/accessibility/AccessibilitySidebarView.ts +8 -8
- package/front_end/panels/animation/AnimationTimeline.ts +5 -5
- package/front_end/panels/animation/AnimationUI.ts +22 -23
- package/front_end/panels/application/ApplicationPanelSidebar.ts +12 -12
- package/front_end/panels/application/DOMStorageModel.ts +23 -23
- package/front_end/panels/application/ExtensionStorageModel.ts +31 -31
- package/front_end/panels/application/IndexedDBModel.ts +1 -0
- package/front_end/panels/application/PreloadingTreeElement.ts +8 -8
- package/front_end/panels/application/ServiceWorkersView.ts +0 -53
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +2 -2
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +2 -2
- package/front_end/panels/common/BadgeNotification.ts +24 -4
- package/front_end/panels/common/GdpSignUpDialog.ts +5 -0
- package/front_end/panels/common/badgeNotification.css +26 -9
- package/front_end/panels/console/ConsoleContextSelector.ts +9 -9
- package/front_end/panels/console/ConsolePrompt.ts +8 -5
- package/front_end/panels/console/ConsoleView.ts +13 -13
- package/front_end/panels/console/ConsoleViewport.ts +29 -29
- package/front_end/panels/coverage/CoverageModel.ts +22 -22
- package/front_end/panels/elements/ClassesPaneWidget.ts +1 -1
- package/front_end/panels/elements/ComputedStyleModel.ts +17 -18
- package/front_end/panels/elements/DOMPath.ts +2 -2
- package/front_end/panels/elements/ElementsPanel.ts +13 -13
- package/front_end/panels/elements/ElementsTreeElement.ts +18 -18
- package/front_end/panels/elements/ElementsTreeOutline.ts +41 -48
- package/front_end/panels/elements/ShortcutTreeElement.ts +4 -4
- package/front_end/panels/elements/StylePropertiesSection.ts +4 -4
- package/front_end/panels/elements/StylePropertyTreeElement.ts +49 -50
- package/front_end/panels/elements/StylesSidebarPane.ts +19 -19
- package/front_end/panels/emulation/DeviceModeToolbar.ts +7 -7
- package/front_end/panels/emulation/DeviceModeView.ts +6 -6
- package/front_end/panels/emulation/MediaQueryInspector.ts +18 -18
- package/front_end/panels/event_listeners/EventListenersView.ts +13 -14
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +3 -3
- package/front_end/panels/layer_viewer/LayerViewHost.ts +13 -13
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +9 -10
- package/front_end/panels/layer_viewer/TransformController.ts +34 -36
- package/front_end/panels/layers/LayerTreeModel.ts +41 -40
- package/front_end/panels/lighthouse/LighthouseReportSelector.ts +13 -13
- package/front_end/panels/lighthouse/LighthouseStartView.ts +7 -7
- package/front_end/panels/media/PlayerMessagesView.ts +5 -5
- package/front_end/panels/media/TickingFlameChart.ts +24 -24
- package/front_end/panels/media/TickingFlameChartHelpers.ts +32 -32
- package/front_end/panels/network/NetworkItemView.ts +4 -4
- package/front_end/panels/network/NetworkLogViewColumns.ts +29 -29
- package/front_end/panels/network/NetworkPanel.ts +8 -5
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +10 -10
- package/front_end/panels/profiler/HeapDetachedElementsView.ts +3 -3
- package/front_end/panels/profiler/HeapProfileView.ts +1 -1
- package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +3 -4
- package/front_end/panels/profiler/ProfileHeader.ts +25 -25
- package/front_end/panels/profiler/ProfileLauncherView.ts +5 -6
- package/front_end/panels/recorder/components/ReplaySection.ts +3 -1
- package/front_end/panels/security/OriginTreeElement.ts +8 -8
- package/front_end/panels/security/SecurityPanel.ts +5 -5
- package/front_end/panels/settings/SettingsScreen.ts +18 -12
- package/front_end/panels/settings/components/SyncSection.ts +20 -6
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +3 -0
- package/front_end/panels/sources/DebuggerPausedMessage.ts +8 -9
- package/front_end/panels/sources/NavigatorView.ts +43 -46
- package/front_end/panels/sources/SourcesPanel.ts +35 -35
- package/front_end/panels/sources/SourcesView.ts +13 -13
- package/front_end/panels/sources/TabbedEditorContainer.ts +19 -22
- package/front_end/panels/sources/UISourceCodeFrame.ts +4 -4
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +34 -36
- package/front_end/panels/timeline/AnimationsTrackAppender.ts +3 -3
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +8 -8
- package/front_end/panels/timeline/CountersGraph.ts +16 -16
- package/front_end/panels/timeline/EntriesFilter.ts +4 -3
- package/front_end/panels/timeline/EventsTimelineTreeView.ts +3 -3
- package/front_end/panels/timeline/GPUTrackAppender.ts +3 -3
- package/front_end/panels/timeline/Initiators.ts +10 -10
- package/front_end/panels/timeline/InteractionsTrackAppender.ts +5 -5
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +7 -7
- package/front_end/panels/timeline/ModificationsManager.ts +8 -15
- package/front_end/panels/timeline/TargetForEvent.ts +2 -2
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +1 -1
- package/front_end/panels/timeline/ThreadAppender.ts +13 -13
- package/front_end/panels/timeline/TimelineDetailsView.ts +6 -14
- package/front_end/panels/timeline/TimelineEventOverview.ts +27 -26
- package/front_end/panels/timeline/TimelineFilters.ts +5 -5
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +54 -53
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +34 -34
- package/front_end/panels/timeline/TimelineFlameChartView.ts +18 -31
- package/front_end/panels/timeline/TimelineHistoryManager.ts +17 -18
- package/front_end/panels/timeline/TimelineMiniMap.ts +6 -6
- package/front_end/panels/timeline/TimelinePaintProfilerView.ts +6 -6
- package/front_end/panels/timeline/TimelinePanel.ts +52 -59
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +7 -5
- package/front_end/panels/timeline/TimelineTreeView.ts +10 -10
- package/front_end/panels/timeline/TimelineUIUtils.ts +43 -43
- package/front_end/panels/timeline/TimingsTrackAppender.ts +12 -12
- package/front_end/panels/timeline/TracingLayerTree.ts +43 -43
- package/front_end/panels/timeline/TrackConfigBanner.ts +6 -6
- package/front_end/panels/timeline/TrackConfiguration.ts +1 -1
- package/front_end/panels/timeline/components/DetailsView.ts +4 -4
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +12 -21
- package/front_end/panels/timeline/components/LiveMetricsView.ts +2 -1
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +5 -5
- package/front_end/panels/timeline/components/Sidebar.ts +4 -14
- package/front_end/panels/timeline/components/SidebarInsightsTab.ts +13 -36
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +21 -19
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +1 -1
- package/front_end/panels/timeline/components/insights/Cache.ts +4 -0
- package/front_end/panels/timeline/components/insights/DOMSize.ts +5 -1
- package/front_end/panels/timeline/components/insights/Helpers.ts +19 -0
- package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +1 -1
- package/front_end/panels/timeline/components/insights/Viewport.ts +4 -0
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +1 -1
- package/front_end/panels/timeline/utils/AICallTree.ts +11 -11
- package/front_end/panels/timeline/utils/AIContext.ts +17 -19
- package/front_end/panels/timeline/utils/EntityMapper.ts +6 -5
- package/front_end/panels/timeline/utils/EntryName.ts +2 -2
- package/front_end/panels/timeline/utils/EntryNodes.ts +5 -5
- package/front_end/panels/timeline/utils/EntryStyles.ts +4 -4
- package/front_end/panels/timeline/utils/FreshRecording.ts +3 -3
- package/front_end/panels/timeline/utils/Helpers.ts +0 -18
- package/front_end/panels/timeline/utils/InsightAIContext.ts +6 -6
- package/front_end/panels/timeline/utils/SourceMapsResolver.ts +7 -7
- package/front_end/panels/webauthn/WebauthnPane.ts +1 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/codemirror.next/chunk/angular.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/angular.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/cpp.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/cpp.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/java.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/java.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/legacy.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/legacy.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/less.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/less.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/markdown.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/php.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/php.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/python.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/python.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/sass.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/sass.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/svelte.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/svelte.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/vue.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/vue.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/wast.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/wast.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/xml.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/xml.js.map +1 -1
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
- package/front_end/third_party/codemirror.next/package.json +1 -1
- package/front_end/third_party/codemirror.next/rebuild.sh +1 -1
- package/front_end/third_party/json5/rebuild.sh +1 -1
- package/front_end/third_party/legacy-javascript/{update.sh → rebuild.sh} +1 -1
- package/front_end/third_party/lit/lib/decorators.d.ts +26 -9
- package/front_end/third_party/lit/lib/decorators.js +5 -5
- package/front_end/third_party/lit/lib/decorators.js.map +1 -1
- package/front_end/third_party/lit/lib/directive.js.map +1 -1
- package/front_end/third_party/lit/lib/directives.js +8 -13
- package/front_end/third_party/lit/lib/directives.js.map +1 -1
- package/front_end/third_party/lit/lib/lit.d.ts +26 -9
- package/front_end/third_party/lit/lib/lit.js +5 -5
- package/front_end/third_party/lit/lib/lit.js.map +1 -1
- package/front_end/third_party/lit/lib/static-html.js +2 -2
- package/front_end/third_party/lit/lib/static-html.js.map +1 -1
- package/front_end/third_party/lit/rebuild.sh +1 -1
- package/front_end/third_party/third-party-web/rebuild.sh +1 -1
- package/front_end/ui/components/dialogs/Dialog.ts +6 -7
- package/front_end/ui/legacy/ActionRegistration.ts +9 -9
- package/front_end/ui/legacy/DockController.ts +18 -18
- package/front_end/ui/legacy/FilterBar.ts +7 -7
- package/front_end/ui/legacy/Fragment.ts +4 -4
- package/front_end/ui/legacy/GlassPane.ts +12 -12
- package/front_end/ui/legacy/InspectorView.ts +5 -15
- package/front_end/ui/legacy/ListControl.ts +27 -27
- package/front_end/ui/legacy/ListWidget.ts +4 -4
- package/front_end/ui/legacy/PopoverHelper.ts +4 -4
- package/front_end/ui/legacy/ShortcutRegistry.ts +17 -17
- package/front_end/ui/legacy/TabbedPane.ts +74 -75
- package/front_end/ui/legacy/TextPrompt.ts +31 -31
- package/front_end/ui/legacy/Toolbar.ts +13 -14
- package/front_end/ui/legacy/ViewManager.ts +30 -31
- package/front_end/ui/legacy/Widget.ts +6 -6
- package/front_end/ui/legacy/XLink.ts +9 -9
- package/front_end/ui/legacy/ZoomManager.ts +9 -9
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +27 -27
- package/front_end/ui/legacy/components/color_picker/ContrastInfo.ts +30 -32
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +15 -15
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +64 -64
- package/front_end/ui/legacy/components/data_grid/ShowMoreDataGridNode.ts +2 -2
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +10 -11
- package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +12 -12
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +3 -3
- package/front_end/ui/legacy/components/perf_ui/TimelineGrid.ts +14 -14
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +8 -8
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +5 -5
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +4 -4
- package/front_end/ui/legacy/theme_support/ThemeSupport.ts +4 -4
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -2
- package/package.json +1 -1
@@ -164,15 +164,15 @@ export const WASM_SYMBOLS_PRIORITY = [
|
|
164
164
|
|
165
165
|
export class DebuggerModel extends SDKModel<EventTypes> {
|
166
166
|
readonly agent: ProtocolProxyApi.DebuggerApi;
|
167
|
-
|
168
|
-
readonly #
|
169
|
-
#
|
170
|
-
readonly #
|
167
|
+
#runtimeModel: RuntimeModel;
|
168
|
+
readonly #sourceMapManager: SourceMapManager<Script>;
|
169
|
+
#debuggerPausedDetails: DebuggerPausedDetails|null = null;
|
170
|
+
readonly #scripts = new Map<string, Script>();
|
171
171
|
readonly #scriptsBySourceURL = new Map<string, Script[]>();
|
172
172
|
#discardableScripts: Script[] = [];
|
173
173
|
continueToLocationCallback: ((arg0: DebuggerPausedDetails) => boolean)|null = null;
|
174
|
-
#
|
175
|
-
#
|
174
|
+
#selectedCallFrame: CallFrame|null = null;
|
175
|
+
#debuggerEnabled = false;
|
176
176
|
#debuggerId: string|null = null;
|
177
177
|
#skipAllPausesTimeout = 0;
|
178
178
|
#beforePausedCallback: ((arg0: DebuggerPausedDetails, stepOver: Location|null) => Promise<boolean>)|null = null;
|
@@ -190,16 +190,16 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
190
190
|
// When stepping over with autostepping enabled, the context denotes the function to which autostepping is restricted
|
191
191
|
// to by way of its functionLocation (as per Debugger.CallFrame).
|
192
192
|
#autoSteppingContext: Location|null = null;
|
193
|
-
#
|
193
|
+
#isPausing = false;
|
194
194
|
|
195
195
|
constructor(target: Target) {
|
196
196
|
super(target);
|
197
197
|
|
198
198
|
target.registerDebuggerDispatcher(new DebuggerDispatcher(this));
|
199
199
|
this.agent = target.debuggerAgent();
|
200
|
-
this
|
200
|
+
this.#runtimeModel = (target.model(RuntimeModel) as RuntimeModel);
|
201
201
|
|
202
|
-
this.#
|
202
|
+
this.#sourceMapManager = new SourceMapManager(target);
|
203
203
|
|
204
204
|
Common.Settings.Settings.instance()
|
205
205
|
.moduleSetting('pause-on-exception-enabled')
|
@@ -221,11 +221,11 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
221
221
|
void this.enableDebugger();
|
222
222
|
}
|
223
223
|
|
224
|
-
this.#
|
224
|
+
this.#sourceMapManager.setEnabled(
|
225
225
|
Common.Settings.Settings.instance().moduleSetting('js-source-maps-enabled').get());
|
226
226
|
Common.Settings.Settings.instance()
|
227
227
|
.moduleSetting('js-source-maps-enabled')
|
228
|
-
.addChangeListener(event => this.#
|
228
|
+
.addChangeListener(event => this.#sourceMapManager.setEnabled((event.data as boolean)));
|
229
229
|
|
230
230
|
const resourceTreeModel = (target.model(ResourceTreeModel) as ResourceTreeModel);
|
231
231
|
if (resourceTreeModel) {
|
@@ -267,15 +267,15 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
267
267
|
}
|
268
268
|
|
269
269
|
sourceMapManager(): SourceMapManager<Script> {
|
270
|
-
return this.#
|
270
|
+
return this.#sourceMapManager;
|
271
271
|
}
|
272
272
|
|
273
273
|
runtimeModel(): RuntimeModel {
|
274
|
-
return this
|
274
|
+
return this.#runtimeModel;
|
275
275
|
}
|
276
276
|
|
277
277
|
debuggerEnabled(): boolean {
|
278
|
-
return Boolean(this.#
|
278
|
+
return Boolean(this.#debuggerEnabled);
|
279
279
|
}
|
280
280
|
|
281
281
|
debuggerId(): string|null {
|
@@ -283,10 +283,10 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
283
283
|
}
|
284
284
|
|
285
285
|
private async enableDebugger(): Promise<void> {
|
286
|
-
if (this.#
|
286
|
+
if (this.#debuggerEnabled) {
|
287
287
|
return;
|
288
288
|
}
|
289
|
-
this.#
|
289
|
+
this.#debuggerEnabled = true;
|
290
290
|
|
291
291
|
// Set a limit for the total size of collected script sources retained by debugger.
|
292
292
|
// 10MB for remote frontends, 100MB for others.
|
@@ -327,7 +327,7 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
327
327
|
|
328
328
|
private registerDebugger(response: Protocol.Debugger.EnableResponse): void {
|
329
329
|
if (response.getError()) {
|
330
|
-
this.#
|
330
|
+
this.#debuggerEnabled = false;
|
331
331
|
return;
|
332
332
|
}
|
333
333
|
const {debuggerId} = response;
|
@@ -358,14 +358,14 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
358
358
|
}
|
359
359
|
|
360
360
|
private async disableDebugger(): Promise<void> {
|
361
|
-
if (!this.#
|
361
|
+
if (!this.#debuggerEnabled) {
|
362
362
|
return;
|
363
363
|
}
|
364
|
-
this.#
|
364
|
+
this.#debuggerEnabled = false;
|
365
365
|
|
366
366
|
await this.asyncStackTracesStateChanged();
|
367
367
|
await this.agent.invoke_disable();
|
368
|
-
this.#
|
368
|
+
this.#isPausing = false;
|
369
369
|
this.globalObjectCleared();
|
370
370
|
this.dispatchEventToListeners(Events.DebuggerWasDisabled, this);
|
371
371
|
if (typeof this.#debuggerId === 'string') {
|
@@ -411,8 +411,8 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
411
411
|
|
412
412
|
private asyncStackTracesStateChanged(): Promise<Protocol.ProtocolResponseWithError> {
|
413
413
|
const maxAsyncStackChainDepth = 32;
|
414
|
-
const enabled =
|
415
|
-
this.#
|
414
|
+
const enabled =
|
415
|
+
!Common.Settings.Settings.instance().moduleSetting('disable-async-stack-traces').get() && this.#debuggerEnabled;
|
416
416
|
const maxDepth = enabled ? maxAsyncStackChainDepth : 0;
|
417
417
|
return this.agent.invoke_setAsyncCallStackDepth({maxDepth});
|
418
418
|
}
|
@@ -429,9 +429,9 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
429
429
|
|
430
430
|
private async computeAutoStepSkipList(mode: StepMode): Promise<Protocol.Debugger.LocationRange[]> {
|
431
431
|
let ranges: LocationRange[] = [];
|
432
|
-
if (this.#computeAutoStepRangesCallback && this.#
|
433
|
-
this.#
|
434
|
-
const [callFrame] = this.#
|
432
|
+
if (this.#computeAutoStepRangesCallback && this.#debuggerPausedDetails &&
|
433
|
+
this.#debuggerPausedDetails.callFrames.length > 0) {
|
434
|
+
const [callFrame] = this.#debuggerPausedDetails.callFrames;
|
435
435
|
ranges = await this.#computeAutoStepRangesCallback.call(null, mode, callFrame);
|
436
436
|
}
|
437
437
|
const skipList = ranges.map(({start, end}) => ({
|
@@ -448,7 +448,7 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
448
448
|
}
|
449
449
|
|
450
450
|
async stepOver(): Promise<void> {
|
451
|
-
this.#autoSteppingContext = this.#
|
451
|
+
this.#autoSteppingContext = this.#debuggerPausedDetails?.callFrames[0]?.functionLocation() ?? null;
|
452
452
|
const skipList = await this.computeAutoStepSkipList(StepMode.STEP_OVER);
|
453
453
|
void this.agent.invoke_stepOver({skipList});
|
454
454
|
}
|
@@ -470,11 +470,11 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
470
470
|
|
471
471
|
resume(): void {
|
472
472
|
void this.agent.invoke_resume({terminateOnResume: false});
|
473
|
-
this.#
|
473
|
+
this.#isPausing = false;
|
474
474
|
}
|
475
475
|
|
476
476
|
pause(): void {
|
477
|
-
this.#
|
477
|
+
this.#isPausing = true;
|
478
478
|
this.skipAllPauses(false);
|
479
479
|
void this.agent.invoke_pause();
|
480
480
|
}
|
@@ -568,21 +568,21 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
568
568
|
}
|
569
569
|
|
570
570
|
private reset(): void {
|
571
|
-
for (const script of this.#
|
572
|
-
this.#
|
571
|
+
for (const script of this.#scripts.values()) {
|
572
|
+
this.#sourceMapManager.detachSourceMap(script);
|
573
573
|
}
|
574
|
-
this.#
|
574
|
+
this.#scripts.clear();
|
575
575
|
this.#scriptsBySourceURL.clear();
|
576
576
|
this.#discardableScripts = [];
|
577
577
|
this.#autoSteppingContext = null;
|
578
578
|
}
|
579
579
|
|
580
580
|
scripts(): Script[] {
|
581
|
-
return Array.from(this.#
|
581
|
+
return Array.from(this.#scripts.values());
|
582
582
|
}
|
583
583
|
|
584
584
|
scriptForId(scriptId: string): Script|null {
|
585
|
-
return this.#
|
585
|
+
return this.#scripts.get(scriptId) || null;
|
586
586
|
}
|
587
587
|
|
588
588
|
/**
|
@@ -595,7 +595,7 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
595
595
|
|
596
596
|
scriptsForExecutionContext(executionContext: ExecutionContext): Script[] {
|
597
597
|
const result = [];
|
598
|
-
for (const script of this.#
|
598
|
+
for (const script of this.#scripts.values()) {
|
599
599
|
if (script.executionContextId === executionContext.id) {
|
600
600
|
result.push(script);
|
601
601
|
}
|
@@ -604,16 +604,16 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
604
604
|
}
|
605
605
|
|
606
606
|
get callFrames(): CallFrame[]|null {
|
607
|
-
return this.#
|
607
|
+
return this.#debuggerPausedDetails ? this.#debuggerPausedDetails.callFrames : null;
|
608
608
|
}
|
609
609
|
|
610
610
|
debuggerPausedDetails(): DebuggerPausedDetails|null {
|
611
|
-
return this.#
|
611
|
+
return this.#debuggerPausedDetails;
|
612
612
|
}
|
613
613
|
|
614
614
|
private async setDebuggerPausedDetails(debuggerPausedDetails: DebuggerPausedDetails): Promise<boolean> {
|
615
|
-
this.#
|
616
|
-
this.#
|
615
|
+
this.#isPausing = false;
|
616
|
+
this.#debuggerPausedDetails = debuggerPausedDetails;
|
617
617
|
if (this.#beforePausedCallback) {
|
618
618
|
if (!await this.#beforePausedCallback.call(null, debuggerPausedDetails, this.#autoSteppingContext)) {
|
619
619
|
return false;
|
@@ -628,8 +628,8 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
628
628
|
}
|
629
629
|
|
630
630
|
private resetDebuggerPausedDetails(): void {
|
631
|
-
this.#
|
632
|
-
this.#
|
631
|
+
this.#isPausing = false;
|
632
|
+
this.#debuggerPausedDetails = null;
|
633
633
|
this.setSelectedCallFrame(null);
|
634
634
|
}
|
635
635
|
|
@@ -729,7 +729,7 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
729
729
|
isModule: boolean|null, originStackTrace: Protocol.Runtime.StackTrace|null, codeOffset: number|null,
|
730
730
|
scriptLanguage: string|null, debugSymbols: Protocol.Debugger.DebugSymbols[]|null,
|
731
731
|
embedderName: Platform.DevToolsPath.UrlString|null, buildId: string|null): Script {
|
732
|
-
const knownScript = this.#
|
732
|
+
const knownScript = this.#scripts.get(scriptId);
|
733
733
|
if (knownScript) {
|
734
734
|
return knownScript;
|
735
735
|
}
|
@@ -747,7 +747,7 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
747
747
|
this.dispatchEventToListeners(Events.ParsedScriptSource, script);
|
748
748
|
|
749
749
|
if (script.sourceMapURL && !hasSyntaxError) {
|
750
|
-
this.#
|
750
|
+
this.#sourceMapManager.attachSourceMap(script, script.sourceURL, script.sourceMapURL);
|
751
751
|
}
|
752
752
|
|
753
753
|
const isDiscardable = hasSyntaxError && script.isAnonymousScript();
|
@@ -760,29 +760,29 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
760
760
|
|
761
761
|
setSourceMapURL(script: Script, newSourceMapURL: Platform.DevToolsPath.UrlString): void {
|
762
762
|
// Detach any previous source map from the `script` first.
|
763
|
-
this.#
|
763
|
+
this.#sourceMapManager.detachSourceMap(script);
|
764
764
|
script.sourceMapURL = newSourceMapURL;
|
765
|
-
this.#
|
765
|
+
this.#sourceMapManager.attachSourceMap(script, script.sourceURL, script.sourceMapURL);
|
766
766
|
}
|
767
767
|
|
768
768
|
async setDebugInfoURL(script: Script, _externalURL: Platform.DevToolsPath.UrlString): Promise<void> {
|
769
|
-
if (this.#expandCallFramesCallback && this.#
|
770
|
-
this.#
|
771
|
-
await this.#expandCallFramesCallback.call(null, this.#
|
769
|
+
if (this.#expandCallFramesCallback && this.#debuggerPausedDetails) {
|
770
|
+
this.#debuggerPausedDetails.callFrames =
|
771
|
+
await this.#expandCallFramesCallback.call(null, this.#debuggerPausedDetails.callFrames);
|
772
772
|
}
|
773
773
|
this.dispatchEventToListeners(Events.DebugInfoAttached, script);
|
774
774
|
}
|
775
775
|
|
776
776
|
executionContextDestroyed(executionContext: ExecutionContext): void {
|
777
|
-
for (const script of this.#
|
777
|
+
for (const script of this.#scripts.values()) {
|
778
778
|
if (script.executionContextId === executionContext.id) {
|
779
|
-
this.#
|
779
|
+
this.#sourceMapManager.detachSourceMap(script);
|
780
780
|
}
|
781
781
|
}
|
782
782
|
}
|
783
783
|
|
784
784
|
private registerScript(script: Script): void {
|
785
|
-
this.#
|
785
|
+
this.#scripts.set(script.scriptId, script);
|
786
786
|
if (script.isAnonymousScript()) {
|
787
787
|
return;
|
788
788
|
}
|
@@ -800,7 +800,7 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
800
800
|
|
801
801
|
private unregisterScript(script: Script): void {
|
802
802
|
console.assert(script.isAnonymousScript());
|
803
|
-
this.#
|
803
|
+
this.#scripts.delete(script.scriptId);
|
804
804
|
}
|
805
805
|
|
806
806
|
private collectDiscardedScripts(): void {
|
@@ -855,19 +855,19 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
855
855
|
}
|
856
856
|
|
857
857
|
isPausing(): boolean {
|
858
|
-
return this.#
|
858
|
+
return this.#isPausing;
|
859
859
|
}
|
860
860
|
|
861
861
|
setSelectedCallFrame(callFrame: CallFrame|null): void {
|
862
|
-
if (this.#
|
862
|
+
if (this.#selectedCallFrame === callFrame) {
|
863
863
|
return;
|
864
864
|
}
|
865
|
-
this.#
|
865
|
+
this.#selectedCallFrame = callFrame;
|
866
866
|
this.dispatchEventToListeners(Events.CallFrameSelected, this);
|
867
867
|
}
|
868
868
|
|
869
869
|
selectedCallFrame(): CallFrame|null {
|
870
|
-
return this.#
|
870
|
+
return this.#selectedCallFrame;
|
871
871
|
}
|
872
872
|
|
873
873
|
async evaluateOnSelectedCallFrame(options: EvaluationOptions): Promise<EvaluationResult> {
|
@@ -1248,13 +1248,13 @@ export class CallFrame {
|
|
1248
1248
|
debuggerModel: DebuggerModel;
|
1249
1249
|
readonly script: Script;
|
1250
1250
|
payload: Protocol.Debugger.CallFrame;
|
1251
|
-
readonly #
|
1252
|
-
readonly #
|
1253
|
-
readonly #
|
1251
|
+
readonly #location: Location;
|
1252
|
+
readonly #scopeChain: Scope[];
|
1253
|
+
readonly #localScope: Scope|null;
|
1254
1254
|
readonly inlineFrameIndex: number;
|
1255
1255
|
readonly functionName: string;
|
1256
|
-
readonly #
|
1257
|
-
#
|
1256
|
+
readonly #functionLocation: Location|undefined;
|
1257
|
+
#returnValue: RemoteObject|null;
|
1258
1258
|
missingDebugInfoDetails: MissingDebugInfoDetails|null;
|
1259
1259
|
readonly exception: RemoteObject|null;
|
1260
1260
|
|
@@ -1266,9 +1266,9 @@ export class CallFrame {
|
|
1266
1266
|
this.debuggerModel = debuggerModel;
|
1267
1267
|
this.script = script;
|
1268
1268
|
this.payload = payload;
|
1269
|
-
this.#
|
1270
|
-
this.#
|
1271
|
-
this.#
|
1269
|
+
this.#location = Location.fromPayload(debuggerModel, payload.location, inlineFrameIndex);
|
1270
|
+
this.#scopeChain = [];
|
1271
|
+
this.#localScope = null;
|
1272
1272
|
this.inlineFrameIndex = inlineFrameIndex || 0;
|
1273
1273
|
this.functionName = functionName ?? payload.functionName;
|
1274
1274
|
this.missingDebugInfoDetails = null;
|
@@ -1276,15 +1276,15 @@ export class CallFrame {
|
|
1276
1276
|
this.exception = exception;
|
1277
1277
|
for (let i = 0; i < payload.scopeChain.length; ++i) {
|
1278
1278
|
const scope = new Scope(this, i);
|
1279
|
-
this.#
|
1279
|
+
this.#scopeChain.push(scope);
|
1280
1280
|
if (scope.type() === Protocol.Debugger.ScopeType.Local) {
|
1281
|
-
this.#
|
1281
|
+
this.#localScope = scope;
|
1282
1282
|
}
|
1283
1283
|
}
|
1284
1284
|
if (payload.functionLocation) {
|
1285
|
-
this.#
|
1285
|
+
this.#functionLocation = Location.fromPayload(debuggerModel, payload.functionLocation);
|
1286
1286
|
}
|
1287
|
-
this.#
|
1287
|
+
this.#returnValue =
|
1288
1288
|
payload.returnValue ? this.debuggerModel.runtimeModel().createRemoteObject(payload.returnValue) : null;
|
1289
1289
|
}
|
1290
1290
|
|
@@ -1312,11 +1312,11 @@ export class CallFrame {
|
|
1312
1312
|
}
|
1313
1313
|
|
1314
1314
|
scopeChain(): Scope[] {
|
1315
|
-
return this.#
|
1315
|
+
return this.#scopeChain;
|
1316
1316
|
}
|
1317
1317
|
|
1318
1318
|
localScope(): Scope|null {
|
1319
|
-
return this.#
|
1319
|
+
return this.#localScope;
|
1320
1320
|
}
|
1321
1321
|
|
1322
1322
|
thisObject(): RemoteObject|null {
|
@@ -1324,11 +1324,11 @@ export class CallFrame {
|
|
1324
1324
|
}
|
1325
1325
|
|
1326
1326
|
returnValue(): RemoteObject|null {
|
1327
|
-
return this.#
|
1327
|
+
return this.#returnValue;
|
1328
1328
|
}
|
1329
1329
|
|
1330
1330
|
async setReturnValue(expression: string): Promise<RemoteObject|null> {
|
1331
|
-
if (!this.#
|
1331
|
+
if (!this.#returnValue) {
|
1332
1332
|
return null;
|
1333
1333
|
}
|
1334
1334
|
|
@@ -1341,16 +1341,16 @@ export class CallFrame {
|
|
1341
1341
|
if (response.getError()) {
|
1342
1342
|
return null;
|
1343
1343
|
}
|
1344
|
-
this.#
|
1345
|
-
return this.#
|
1344
|
+
this.#returnValue = this.debuggerModel.runtimeModel().createRemoteObject(evaluateResponse.result);
|
1345
|
+
return this.#returnValue;
|
1346
1346
|
}
|
1347
1347
|
|
1348
1348
|
location(): Location {
|
1349
|
-
return this.#
|
1349
|
+
return this.#location;
|
1350
1350
|
}
|
1351
1351
|
|
1352
1352
|
functionLocation(): Location|null {
|
1353
|
-
return this.#
|
1353
|
+
return this.#functionLocation || null;
|
1354
1354
|
}
|
1355
1355
|
|
1356
1356
|
async evaluate(options: EvaluationOptions): Promise<EvaluationResult> {
|
@@ -1422,20 +1422,20 @@ export interface ScopeChainEntry {
|
|
1422
1422
|
}
|
1423
1423
|
|
1424
1424
|
export class Scope implements ScopeChainEntry {
|
1425
|
-
#
|
1425
|
+
#callFrame: CallFrame;
|
1426
1426
|
#payload: Protocol.Debugger.Scope;
|
1427
|
-
readonly #
|
1428
|
-
readonly #
|
1427
|
+
readonly #type: Protocol.Debugger.ScopeType;
|
1428
|
+
readonly #name: string|undefined;
|
1429
1429
|
#ordinal: number;
|
1430
1430
|
readonly #locationRange: LocationRange|null;
|
1431
|
-
#
|
1431
|
+
#object: RemoteObject|null;
|
1432
1432
|
constructor(callFrame: CallFrame, ordinal: number) {
|
1433
|
-
this.#
|
1433
|
+
this.#callFrame = callFrame;
|
1434
1434
|
this.#payload = callFrame.getPayload().scopeChain[ordinal];
|
1435
|
-
this.#
|
1436
|
-
this.#
|
1435
|
+
this.#type = this.#payload.type;
|
1436
|
+
this.#name = this.#payload.name;
|
1437
1437
|
this.#ordinal = ordinal;
|
1438
|
-
this.#
|
1438
|
+
this.#object = null;
|
1439
1439
|
|
1440
1440
|
const start =
|
1441
1441
|
this.#payload.startLocation ? Location.fromPayload(callFrame.debuggerModel, this.#payload.startLocation) : null;
|
@@ -1449,15 +1449,15 @@ export class Scope implements ScopeChainEntry {
|
|
1449
1449
|
}
|
1450
1450
|
|
1451
1451
|
callFrame(): CallFrame {
|
1452
|
-
return this.#
|
1452
|
+
return this.#callFrame;
|
1453
1453
|
}
|
1454
1454
|
|
1455
1455
|
type(): string {
|
1456
|
-
return this.#
|
1456
|
+
return this.#type;
|
1457
1457
|
}
|
1458
1458
|
|
1459
1459
|
typeName(): string {
|
1460
|
-
switch (this.#
|
1460
|
+
switch (this.#type) {
|
1461
1461
|
case Protocol.Debugger.ScopeType.Local:
|
1462
1462
|
return i18nString(UIStrings.local);
|
1463
1463
|
case Protocol.Debugger.ScopeType.Closure:
|
@@ -1483,7 +1483,7 @@ export class Scope implements ScopeChainEntry {
|
|
1483
1483
|
}
|
1484
1484
|
|
1485
1485
|
name(): string|undefined {
|
1486
|
-
return this.#
|
1486
|
+
return this.#name;
|
1487
1487
|
}
|
1488
1488
|
|
1489
1489
|
range(): LocationRange|null {
|
@@ -1491,26 +1491,26 @@ export class Scope implements ScopeChainEntry {
|
|
1491
1491
|
}
|
1492
1492
|
|
1493
1493
|
object(): RemoteObject {
|
1494
|
-
if (this.#
|
1495
|
-
return this.#
|
1494
|
+
if (this.#object) {
|
1495
|
+
return this.#object;
|
1496
1496
|
}
|
1497
|
-
const runtimeModel = this.#
|
1497
|
+
const runtimeModel = this.#callFrame.debuggerModel.runtimeModel();
|
1498
1498
|
|
1499
|
-
const declarativeScope =
|
1500
|
-
this.#
|
1499
|
+
const declarativeScope =
|
1500
|
+
this.#type !== Protocol.Debugger.ScopeType.With && this.#type !== Protocol.Debugger.ScopeType.Global;
|
1501
1501
|
if (declarativeScope) {
|
1502
|
-
this.#
|
1503
|
-
this.#payload.object, new ScopeRef(this.#ordinal, this.#
|
1502
|
+
this.#object =
|
1503
|
+
runtimeModel.createScopeRemoteObject(this.#payload.object, new ScopeRef(this.#ordinal, this.#callFrame.id));
|
1504
1504
|
} else {
|
1505
|
-
this.#
|
1505
|
+
this.#object = runtimeModel.createRemoteObject(this.#payload.object);
|
1506
1506
|
}
|
1507
1507
|
|
1508
|
-
return this.#
|
1508
|
+
return this.#object;
|
1509
1509
|
}
|
1510
1510
|
|
1511
1511
|
description(): string {
|
1512
|
-
const declarativeScope =
|
1513
|
-
this.#
|
1512
|
+
const declarativeScope =
|
1513
|
+
this.#type !== Protocol.Debugger.ScopeType.With && this.#type !== Protocol.Debugger.ScopeType.Global;
|
1514
1514
|
return declarativeScope ? '' : (this.#payload.object.description || '');
|
1515
1515
|
}
|
1516
1516
|
|
@@ -1519,23 +1519,22 @@ export class Scope implements ScopeChainEntry {
|
|
1519
1519
|
}
|
1520
1520
|
|
1521
1521
|
extraProperties(): RemoteObjectProperty[] {
|
1522
|
-
if (this.#ordinal !== 0 || this.#
|
1523
|
-
this.#callFrameInternal.script.isWasm()) {
|
1522
|
+
if (this.#ordinal !== 0 || this.#type !== Protocol.Debugger.ScopeType.Local || this.#callFrame.script.isWasm()) {
|
1524
1523
|
return [];
|
1525
1524
|
}
|
1526
1525
|
|
1527
1526
|
const extraProperties = [];
|
1528
|
-
const exception = this.#
|
1527
|
+
const exception = this.#callFrame.exception;
|
1529
1528
|
if (exception) {
|
1530
1529
|
extraProperties.push(new RemoteObjectProperty(
|
1531
1530
|
i18nString(UIStrings.exception), exception, undefined, undefined, undefined, undefined, undefined,
|
1532
1531
|
/* synthetic */ true));
|
1533
1532
|
}
|
1534
|
-
const returnValue = this.#
|
1533
|
+
const returnValue = this.#callFrame.returnValue();
|
1535
1534
|
if (returnValue) {
|
1536
1535
|
extraProperties.push(new RemoteObjectProperty(
|
1537
1536
|
i18nString(UIStrings.returnValue), returnValue, undefined, undefined, undefined, undefined, undefined,
|
1538
|
-
/* synthetic */ true, this.#
|
1537
|
+
/* synthetic */ true, this.#callFrame.setReturnValue.bind(this.#callFrame)));
|
1539
1538
|
}
|
1540
1539
|
return extraProperties;
|
1541
1540
|
}
|
@@ -22,7 +22,7 @@ export class EmulationModel extends SDKModel<void> {
|
|
22
22
|
readonly #emulationAgent: ProtocolProxyApi.EmulationApi;
|
23
23
|
readonly #deviceOrientationAgent: ProtocolProxyApi.DeviceOrientationApi;
|
24
24
|
#cssModel: CSSModel|null;
|
25
|
-
readonly #
|
25
|
+
readonly #overlayModel: OverlayModel|null;
|
26
26
|
readonly #mediaConfiguration: Map<string, string>;
|
27
27
|
#cpuPressureEnabled: boolean;
|
28
28
|
#touchEnabled: boolean;
|
@@ -39,9 +39,9 @@ export class EmulationModel extends SDKModel<void> {
|
|
39
39
|
this.#emulationAgent = target.emulationAgent();
|
40
40
|
this.#deviceOrientationAgent = target.deviceOrientationAgent();
|
41
41
|
this.#cssModel = target.model(CSSModel);
|
42
|
-
this.#
|
43
|
-
if (this.#
|
44
|
-
this.#
|
42
|
+
this.#overlayModel = target.model(OverlayModel);
|
43
|
+
if (this.#overlayModel) {
|
44
|
+
this.#overlayModel.addEventListener(Events.INSPECT_MODE_WILL_BE_TOGGLED, () => {
|
45
45
|
void this.updateTouch();
|
46
46
|
}, this);
|
47
47
|
}
|
@@ -243,7 +243,7 @@ export class EmulationModel extends SDKModel<void> {
|
|
243
243
|
}
|
244
244
|
|
245
245
|
overlayModel(): OverlayModel|null {
|
246
|
-
return this.#
|
246
|
+
return this.#overlayModel;
|
247
247
|
}
|
248
248
|
|
249
249
|
async setPressureSourceOverrideEnabled(enabled: boolean): Promise<void> {
|
@@ -417,7 +417,7 @@ export class EmulationModel extends SDKModel<void> {
|
|
417
417
|
};
|
418
418
|
}
|
419
419
|
|
420
|
-
if (this.#
|
420
|
+
if (this.#overlayModel && this.#overlayModel.inspectModeEnabled()) {
|
421
421
|
configuration = {
|
422
422
|
enabled: false,
|
423
423
|
configuration: Protocol.Emulation.SetEmitTouchEventsForMouseRequestConfiguration.Mobile,
|
@@ -78,7 +78,7 @@ class EventListenerBreakpoint extends CategorizedBreakpoint {
|
|
78
78
|
let eventBreakpointManagerInstance: EventBreakpointsManager;
|
79
79
|
|
80
80
|
export class EventBreakpointsManager implements SDKModelObserver<EventBreakpointsModel> {
|
81
|
-
readonly #
|
81
|
+
readonly #eventListenerBreakpoints: EventListenerBreakpoint[] = [];
|
82
82
|
|
83
83
|
constructor() {
|
84
84
|
this.createInstrumentationBreakpoints(Category.AUCTION_WORKLET, [
|
@@ -149,12 +149,12 @@ export class EventBreakpointsManager implements SDKModelObserver<EventBreakpoint
|
|
149
149
|
|
150
150
|
private createInstrumentationBreakpoints(category: Category, instrumentationNames: InstrumentationNames[]): void {
|
151
151
|
for (const instrumentationName of instrumentationNames) {
|
152
|
-
this.#
|
152
|
+
this.#eventListenerBreakpoints.push(new EventListenerBreakpoint(category, instrumentationName));
|
153
153
|
}
|
154
154
|
}
|
155
155
|
|
156
156
|
eventListenerBreakpoints(): EventListenerBreakpoint[] {
|
157
|
-
return this.#
|
157
|
+
return this.#eventListenerBreakpoints.slice();
|
158
158
|
}
|
159
159
|
|
160
160
|
resolveEventListenerBreakpoint({eventName}: EventListenerPausedDetailsAuxData): EventListenerBreakpoint|null {
|
@@ -163,11 +163,11 @@ export class EventBreakpointsManager implements SDKModelObserver<EventBreakpoint
|
|
163
163
|
}
|
164
164
|
|
165
165
|
const instrumentationName = eventName.substring(EventListenerBreakpoint.instrumentationPrefix.length);
|
166
|
-
return this.#
|
166
|
+
return this.#eventListenerBreakpoints.find(b => b.name === instrumentationName) || null;
|
167
167
|
}
|
168
168
|
|
169
169
|
modelAdded(eventBreakpointModel: EventBreakpointsModel): void {
|
170
|
-
for (const breakpoint of this.#
|
170
|
+
for (const breakpoint of this.#eventListenerBreakpoints) {
|
171
171
|
if (breakpoint.enabled()) {
|
172
172
|
breakpoint.updateOnModel(eventBreakpointModel);
|
173
173
|
}
|
@@ -15,7 +15,7 @@ import {Capability, type Target} from './Target.js';
|
|
15
15
|
export class HeapProfilerModel extends SDKModel<EventTypes> {
|
16
16
|
#enabled: boolean;
|
17
17
|
readonly #heapProfilerAgent: ProtocolProxyApi.HeapProfilerApi;
|
18
|
-
readonly #
|
18
|
+
readonly #runtimeModel: RuntimeModel;
|
19
19
|
#samplingProfilerDepth: number;
|
20
20
|
|
21
21
|
constructor(target: Target) {
|
@@ -23,16 +23,16 @@ export class HeapProfilerModel extends SDKModel<EventTypes> {
|
|
23
23
|
target.registerHeapProfilerDispatcher(new HeapProfilerDispatcher(this));
|
24
24
|
this.#enabled = false;
|
25
25
|
this.#heapProfilerAgent = target.heapProfilerAgent();
|
26
|
-
this.#
|
26
|
+
this.#runtimeModel = (target.model(RuntimeModel) as RuntimeModel);
|
27
27
|
this.#samplingProfilerDepth = 0;
|
28
28
|
}
|
29
29
|
|
30
30
|
debuggerModel(): DebuggerModel {
|
31
|
-
return this.#
|
31
|
+
return this.#runtimeModel.debuggerModel();
|
32
32
|
}
|
33
33
|
|
34
34
|
runtimeModel(): RuntimeModel {
|
35
|
-
return this.#
|
35
|
+
return this.#runtimeModel;
|
36
36
|
}
|
37
37
|
|
38
38
|
async enable(): Promise<void> {
|
@@ -97,7 +97,7 @@ export class HeapProfilerModel extends SDKModel<EventTypes> {
|
|
97
97
|
if (result.getError()) {
|
98
98
|
return null;
|
99
99
|
}
|
100
|
-
return this.#
|
100
|
+
return this.#runtimeModel.createRemoteObject(result.result);
|
101
101
|
}
|
102
102
|
|
103
103
|
async addInspectedHeapObject(snapshotObjectId: Protocol.HeapProfiler.HeapSnapshotObjectId): Promise<boolean> {
|