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
@@ -29,7 +29,7 @@ export class ServiceWorkerCacheModel extends SDKModel<EventTypes> implements Pro
|
|
29
29
|
readonly #storageAgent: ProtocolProxyApi.StorageApi;
|
30
30
|
readonly #storageBucketModel: StorageBucketsModel;
|
31
31
|
|
32
|
-
readonly #
|
32
|
+
readonly #caches = new Map<string, Cache>();
|
33
33
|
readonly #storageKeysTracked = new Set<string>();
|
34
34
|
readonly #storageBucketsUpdated = new Set<Protocol.Storage.StorageBucket>();
|
35
35
|
readonly #throttler = new Common.Throttler.Throttler(2000);
|
@@ -66,9 +66,9 @@ export class ServiceWorkerCacheModel extends SDKModel<EventTypes> implements Pro
|
|
66
66
|
}
|
67
67
|
|
68
68
|
clearForStorageKey(storageKey: string): void {
|
69
|
-
for (const [opaqueId, cache] of this.#
|
69
|
+
for (const [opaqueId, cache] of this.#caches.entries()) {
|
70
70
|
if (cache.storageKey === storageKey) {
|
71
|
-
this.#
|
71
|
+
this.#caches.delete((opaqueId));
|
72
72
|
this.cacheRemoved((cache));
|
73
73
|
}
|
74
74
|
}
|
@@ -78,10 +78,10 @@ export class ServiceWorkerCacheModel extends SDKModel<EventTypes> implements Pro
|
|
78
78
|
}
|
79
79
|
|
80
80
|
refreshCacheNames(): void {
|
81
|
-
for (const cache of this.#
|
81
|
+
for (const cache of this.#caches.values()) {
|
82
82
|
this.cacheRemoved(cache);
|
83
83
|
}
|
84
|
-
this.#
|
84
|
+
this.#caches.clear();
|
85
85
|
const storageBuckets = this.#storageBucketModel.getBuckets();
|
86
86
|
for (const storageBucket of storageBuckets) {
|
87
87
|
void this.loadCacheNames(storageBucket.bucket);
|
@@ -94,7 +94,7 @@ export class ServiceWorkerCacheModel extends SDKModel<EventTypes> implements Pro
|
|
94
94
|
console.error(`ServiceWorkerCacheAgent error deleting cache ${cache.toString()}: ${response.getError()}`);
|
95
95
|
return;
|
96
96
|
}
|
97
|
-
this.#
|
97
|
+
this.#caches.delete(cache.cacheId);
|
98
98
|
this.cacheRemoved(cache);
|
99
99
|
}
|
100
100
|
|
@@ -120,14 +120,14 @@ export class ServiceWorkerCacheModel extends SDKModel<EventTypes> implements Pro
|
|
120
120
|
}
|
121
121
|
|
122
122
|
caches(): Cache[] {
|
123
|
-
return [...this.#
|
123
|
+
return [...this.#caches.values()];
|
124
124
|
}
|
125
125
|
|
126
126
|
override dispose(): void {
|
127
|
-
for (const cache of this.#
|
127
|
+
for (const cache of this.#caches.values()) {
|
128
128
|
this.cacheRemoved(cache);
|
129
129
|
}
|
130
|
-
this.#
|
130
|
+
this.#caches.clear();
|
131
131
|
if (this.#enabled) {
|
132
132
|
this.#storageBucketModel.removeEventListener(
|
133
133
|
StorageBucketsModelEvents.BUCKET_ADDED, this.storageBucketAdded, this);
|
@@ -146,13 +146,13 @@ export class ServiceWorkerCacheModel extends SDKModel<EventTypes> implements Pro
|
|
146
146
|
|
147
147
|
private removeStorageBucket(storageBucket: Protocol.Storage.StorageBucket): void {
|
148
148
|
let storageKeyCount = 0;
|
149
|
-
for (const [opaqueId, cache] of this.#
|
149
|
+
for (const [opaqueId, cache] of this.#caches.entries()) {
|
150
150
|
if (storageBucket.storageKey === cache.storageKey) {
|
151
151
|
storageKeyCount++;
|
152
152
|
}
|
153
153
|
if (cache.inBucket(storageBucket)) {
|
154
154
|
storageKeyCount--;
|
155
|
-
this.#
|
155
|
+
this.#caches.delete((opaqueId));
|
156
156
|
this.cacheRemoved((cache));
|
157
157
|
}
|
158
158
|
}
|
@@ -175,7 +175,7 @@ export class ServiceWorkerCacheModel extends SDKModel<EventTypes> implements Pro
|
|
175
175
|
function deleteAndSaveOldCaches(this: ServiceWorkerCacheModel, cache: Cache): void {
|
176
176
|
if (cache.inBucket(storageBucket) && !updatingCachesIds.has(cache.cacheId)) {
|
177
177
|
oldCaches.set(cache.cacheId, cache);
|
178
|
-
this.#
|
178
|
+
this.#caches.delete(cache.cacheId);
|
179
179
|
}
|
180
180
|
}
|
181
181
|
|
@@ -191,13 +191,13 @@ export class ServiceWorkerCacheModel extends SDKModel<EventTypes> implements Pro
|
|
191
191
|
}
|
192
192
|
const cache = new Cache(this, storageBucket, cacheJson.cacheName, cacheJson.cacheId);
|
193
193
|
updatingCachesIds.add(cache.cacheId);
|
194
|
-
if (this.#
|
194
|
+
if (this.#caches.has(cache.cacheId)) {
|
195
195
|
continue;
|
196
196
|
}
|
197
197
|
newCaches.set(cache.cacheId, cache);
|
198
|
-
this.#
|
198
|
+
this.#caches.set(cache.cacheId, cache);
|
199
199
|
}
|
200
|
-
this.#
|
200
|
+
this.#caches.forEach(deleteAndSaveOldCaches, this);
|
201
201
|
newCaches.forEach(this.cacheAdded, this);
|
202
202
|
oldCaches.forEach(this.cacheRemoved, this);
|
203
203
|
}
|
@@ -98,14 +98,9 @@ const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined
|
|
98
98
|
|
99
99
|
export class ServiceWorkerManager extends SDKModel<EventTypes> {
|
100
100
|
readonly #agent: ProtocolProxyApi.ServiceWorkerApi;
|
101
|
-
readonly #
|
101
|
+
readonly #registrations = new Map<string, ServiceWorkerRegistration>();
|
102
102
|
#enabled = false;
|
103
103
|
readonly #forceUpdateSetting: Common.Settings.Setting<boolean>;
|
104
|
-
/** Status of service worker network requests panel */
|
105
|
-
serviceWorkerNetworkRequestsPanelStatus = {
|
106
|
-
isOpen: false,
|
107
|
-
openedAt: 0,
|
108
|
-
};
|
109
104
|
|
110
105
|
constructor(target: Target) {
|
111
106
|
super(target);
|
@@ -134,12 +129,12 @@ export class ServiceWorkerManager extends SDKModel<EventTypes> {
|
|
134
129
|
return;
|
135
130
|
}
|
136
131
|
this.#enabled = false;
|
137
|
-
this.#
|
132
|
+
this.#registrations.clear();
|
138
133
|
await this.#agent.invoke_enable();
|
139
134
|
}
|
140
135
|
|
141
136
|
registrations(): Map<string, ServiceWorkerRegistration> {
|
142
|
-
return this.#
|
137
|
+
return this.#registrations;
|
143
138
|
}
|
144
139
|
|
145
140
|
findVersion(versionId: string): ServiceWorkerVersion|null {
|
@@ -153,12 +148,12 @@ export class ServiceWorkerManager extends SDKModel<EventTypes> {
|
|
153
148
|
}
|
154
149
|
|
155
150
|
deleteRegistration(registrationId: string): void {
|
156
|
-
const registration = this.#
|
151
|
+
const registration = this.#registrations.get(registrationId);
|
157
152
|
if (!registration) {
|
158
153
|
return;
|
159
154
|
}
|
160
155
|
if (registration.isRedundant()) {
|
161
|
-
this.#
|
156
|
+
this.#registrations.delete(registrationId);
|
162
157
|
this.dispatchEventToListeners(Events.REGISTRATION_DELETED, registration);
|
163
158
|
return;
|
164
159
|
}
|
@@ -170,7 +165,7 @@ export class ServiceWorkerManager extends SDKModel<EventTypes> {
|
|
170
165
|
}
|
171
166
|
|
172
167
|
async updateRegistration(registrationId: string): Promise<void> {
|
173
|
-
const registration = this.#
|
168
|
+
const registration = this.#registrations.get(registrationId);
|
174
169
|
if (!registration) {
|
175
170
|
return;
|
176
171
|
}
|
@@ -178,7 +173,7 @@ export class ServiceWorkerManager extends SDKModel<EventTypes> {
|
|
178
173
|
}
|
179
174
|
|
180
175
|
async deliverPushMessage(registrationId: Protocol.ServiceWorker.RegistrationID, data: string): Promise<void> {
|
181
|
-
const registration = this.#
|
176
|
+
const registration = this.#registrations.get(registrationId);
|
182
177
|
if (!registration) {
|
183
178
|
return;
|
184
179
|
}
|
@@ -188,7 +183,7 @@ export class ServiceWorkerManager extends SDKModel<EventTypes> {
|
|
188
183
|
|
189
184
|
async dispatchSyncEvent(registrationId: Protocol.ServiceWorker.RegistrationID, tag: string, lastChance: boolean):
|
190
185
|
Promise<void> {
|
191
|
-
const registration = this.#
|
186
|
+
const registration = this.#registrations.get(registrationId);
|
192
187
|
if (!registration) {
|
193
188
|
return;
|
194
189
|
}
|
@@ -197,7 +192,7 @@ export class ServiceWorkerManager extends SDKModel<EventTypes> {
|
|
197
192
|
}
|
198
193
|
|
199
194
|
async dispatchPeriodicSyncEvent(registrationId: Protocol.ServiceWorker.RegistrationID, tag: string): Promise<void> {
|
200
|
-
const registration = this.#
|
195
|
+
const registration = this.#registrations.get(registrationId);
|
201
196
|
if (!registration) {
|
202
197
|
return;
|
203
198
|
}
|
@@ -223,17 +218,17 @@ export class ServiceWorkerManager extends SDKModel<EventTypes> {
|
|
223
218
|
|
224
219
|
workerRegistrationUpdated(registrations: Protocol.ServiceWorker.ServiceWorkerRegistration[]): void {
|
225
220
|
for (const payload of registrations) {
|
226
|
-
let registration = this.#
|
221
|
+
let registration = this.#registrations.get(payload.registrationId);
|
227
222
|
if (!registration) {
|
228
223
|
registration = new ServiceWorkerRegistration(payload);
|
229
|
-
this.#
|
224
|
+
this.#registrations.set(payload.registrationId, registration);
|
230
225
|
this.dispatchEventToListeners(Events.REGISTRATION_UPDATED, registration);
|
231
226
|
continue;
|
232
227
|
}
|
233
228
|
registration.update(payload);
|
234
229
|
|
235
230
|
if (registration.shouldBeRemoved()) {
|
236
|
-
this.#
|
231
|
+
this.#registrations.delete(registration.id);
|
237
232
|
this.dispatchEventToListeners(Events.REGISTRATION_DELETED, registration);
|
238
233
|
} else {
|
239
234
|
this.dispatchEventToListeners(Events.REGISTRATION_UPDATED, registration);
|
@@ -244,7 +239,7 @@ export class ServiceWorkerManager extends SDKModel<EventTypes> {
|
|
244
239
|
workerVersionUpdated(versions: Protocol.ServiceWorker.ServiceWorkerVersion[]): void {
|
245
240
|
const registrations = new Set<ServiceWorkerRegistration>();
|
246
241
|
for (const payload of versions) {
|
247
|
-
const registration = this.#
|
242
|
+
const registration = this.#registrations.get(payload.registrationId);
|
248
243
|
if (!registration) {
|
249
244
|
continue;
|
250
245
|
}
|
@@ -253,7 +248,7 @@ export class ServiceWorkerManager extends SDKModel<EventTypes> {
|
|
253
248
|
}
|
254
249
|
for (const registration of registrations) {
|
255
250
|
if (registration.shouldBeRemoved()) {
|
256
|
-
this.#
|
251
|
+
this.#registrations.delete(registration.id);
|
257
252
|
this.dispatchEventToListeners(Events.REGISTRATION_DELETED, registration);
|
258
253
|
} else {
|
259
254
|
this.dispatchEventToListeners(Events.REGISTRATION_UPDATED, registration);
|
@@ -262,7 +257,7 @@ export class ServiceWorkerManager extends SDKModel<EventTypes> {
|
|
262
257
|
}
|
263
258
|
|
264
259
|
workerErrorReported(payload: Protocol.ServiceWorker.ServiceWorkerErrorMessage): void {
|
265
|
-
const registration = this.#
|
260
|
+
const registration = this.#registrations.get(payload.registrationId);
|
266
261
|
if (!registration) {
|
267
262
|
return;
|
268
263
|
}
|
@@ -503,7 +498,7 @@ export namespace ServiceWorkerVersion {
|
|
503
498
|
}
|
504
499
|
|
505
500
|
export class ServiceWorkerRegistration {
|
506
|
-
#
|
501
|
+
#fingerprint!: symbol;
|
507
502
|
id!: Protocol.ServiceWorker.RegistrationID;
|
508
503
|
scopeURL!: Platform.DevToolsPath.UrlString;
|
509
504
|
securityOrigin!: Platform.DevToolsPath.UrlString;
|
@@ -517,7 +512,7 @@ export class ServiceWorkerRegistration {
|
|
517
512
|
}
|
518
513
|
|
519
514
|
update(payload: Protocol.ServiceWorker.ServiceWorkerRegistration): void {
|
520
|
-
this.#
|
515
|
+
this.#fingerprint = Symbol('fingerprint');
|
521
516
|
this.id = payload.registrationId;
|
522
517
|
this.scopeURL = payload.scopeURL as Platform.DevToolsPath.UrlString;
|
523
518
|
const parsedURL = new Common.ParsedURL.ParsedURL(payload.scopeURL);
|
@@ -526,7 +521,7 @@ export class ServiceWorkerRegistration {
|
|
526
521
|
}
|
527
522
|
|
528
523
|
fingerprint(): symbol {
|
529
|
-
return this.#
|
524
|
+
return this.#fingerprint;
|
530
525
|
}
|
531
526
|
|
532
527
|
versionsByMode(): Map<string, ServiceWorkerVersion> {
|
@@ -538,7 +533,7 @@ export class ServiceWorkerRegistration {
|
|
538
533
|
}
|
539
534
|
|
540
535
|
updateVersion(payload: Protocol.ServiceWorker.ServiceWorkerVersion): ServiceWorkerVersion {
|
541
|
-
this.#
|
536
|
+
this.#fingerprint = Symbol('fingerprint');
|
542
537
|
let version = this.versions.get(payload.versionId);
|
543
538
|
if (!version) {
|
544
539
|
version = new ServiceWorkerVersion(this, payload);
|
@@ -153,10 +153,10 @@ export class SourceMap {
|
|
153
153
|
static retainRawSourceMaps = false;
|
154
154
|
|
155
155
|
#json: SourceMapV3|null;
|
156
|
-
readonly #
|
156
|
+
readonly #compiledURL: Platform.DevToolsPath.UrlString;
|
157
157
|
readonly #sourceMappingURL: Platform.DevToolsPath.UrlString;
|
158
158
|
readonly #baseURL: Platform.DevToolsPath.UrlString;
|
159
|
-
#
|
159
|
+
#mappings: SourceMapEntry[]|null;
|
160
160
|
|
161
161
|
readonly #sourceInfos: SourceInfo[] = [];
|
162
162
|
readonly #sourceInfoByURL = new Map<Platform.DevToolsPath.UrlString, SourceInfo>();
|
@@ -173,12 +173,12 @@ export class SourceMap {
|
|
173
173
|
compiledURL: Platform.DevToolsPath.UrlString, sourceMappingURL: Platform.DevToolsPath.UrlString,
|
174
174
|
payload: SourceMapV3) {
|
175
175
|
this.#json = payload;
|
176
|
-
this.#
|
176
|
+
this.#compiledURL = compiledURL;
|
177
177
|
this.#sourceMappingURL = sourceMappingURL;
|
178
178
|
this.#baseURL = (Common.ParsedURL.schemeIs(sourceMappingURL, 'data:')) ? compiledURL : sourceMappingURL;
|
179
179
|
this.#debugId = 'debugId' in payload ? (payload.debugId as DebugId | undefined) : undefined;
|
180
180
|
|
181
|
-
this.#
|
181
|
+
this.#mappings = null;
|
182
182
|
if ('sections' in this.#json) {
|
183
183
|
if (this.#json.sections.find(section => 'url' in section)) {
|
184
184
|
Common.Console.Console.instance().warn(
|
@@ -218,7 +218,7 @@ export class SourceMap {
|
|
218
218
|
}
|
219
219
|
|
220
220
|
compiledURL(): Platform.DevToolsPath.UrlString {
|
221
|
-
return this.#
|
221
|
+
return this.#compiledURL;
|
222
222
|
}
|
223
223
|
|
224
224
|
url(): Platform.DevToolsPath.UrlString {
|
@@ -403,7 +403,7 @@ export class SourceMap {
|
|
403
403
|
|
404
404
|
mappings(): SourceMapEntry[] {
|
405
405
|
this.#ensureMappingsProcessed();
|
406
|
-
return this.#
|
406
|
+
return this.#mappings ?? [];
|
407
407
|
}
|
408
408
|
|
409
409
|
private reversedMappings(sourceURL: Platform.DevToolsPath.UrlString): number[] {
|
@@ -412,19 +412,19 @@ export class SourceMap {
|
|
412
412
|
}
|
413
413
|
|
414
414
|
#ensureMappingsProcessed(): void {
|
415
|
-
if (this.#
|
416
|
-
this.#
|
415
|
+
if (this.#mappings === null) {
|
416
|
+
this.#mappings = [];
|
417
417
|
try {
|
418
418
|
this.eachSection(this.parseMap.bind(this));
|
419
419
|
} catch (e) {
|
420
420
|
console.error('Failed to parse source map', e);
|
421
|
-
this.#
|
421
|
+
this.#mappings = [];
|
422
422
|
}
|
423
423
|
|
424
424
|
// As per spec, mappings are not necessarily sorted.
|
425
425
|
this.mappings().sort(SourceMapEntry.compare);
|
426
426
|
|
427
|
-
this.#computeReverseMappings(this.#
|
427
|
+
this.#computeReverseMappings(this.#mappings);
|
428
428
|
}
|
429
429
|
|
430
430
|
if (!SourceMap.retainRawSourceMaps) {
|
@@ -9,26 +9,26 @@ import {SDKModel} from './SDKModel.js';
|
|
9
9
|
import {Capability, type Target} from './Target.js';
|
10
10
|
|
11
11
|
export class StorageKeyManager extends SDKModel<EventTypes> {
|
12
|
-
#
|
13
|
-
#
|
12
|
+
#mainStorageKey: string;
|
13
|
+
#storageKeys: Set<string>;
|
14
14
|
constructor(target: Target) {
|
15
15
|
super(target);
|
16
16
|
|
17
|
-
this.#
|
18
|
-
this.#
|
17
|
+
this.#mainStorageKey = '';
|
18
|
+
this.#storageKeys = new Set();
|
19
19
|
}
|
20
20
|
|
21
21
|
updateStorageKeys(storageKeys: Set<string>): void {
|
22
|
-
const oldStorageKeys = this.#
|
23
|
-
this.#
|
22
|
+
const oldStorageKeys = this.#storageKeys;
|
23
|
+
this.#storageKeys = storageKeys;
|
24
24
|
|
25
25
|
for (const storageKey of oldStorageKeys) {
|
26
|
-
if (!this.#
|
26
|
+
if (!this.#storageKeys.has(storageKey)) {
|
27
27
|
this.dispatchEventToListeners(Events.STORAGE_KEY_REMOVED, storageKey);
|
28
28
|
}
|
29
29
|
}
|
30
30
|
|
31
|
-
for (const storageKey of this.#
|
31
|
+
for (const storageKey of this.#storageKeys) {
|
32
32
|
if (!oldStorageKeys.has(storageKey)) {
|
33
33
|
this.dispatchEventToListeners(Events.STORAGE_KEY_ADDED, storageKey);
|
34
34
|
}
|
@@ -36,17 +36,17 @@ export class StorageKeyManager extends SDKModel<EventTypes> {
|
|
36
36
|
}
|
37
37
|
|
38
38
|
storageKeys(): string[] {
|
39
|
-
return [...this.#
|
39
|
+
return [...this.#storageKeys];
|
40
40
|
}
|
41
41
|
|
42
42
|
mainStorageKey(): string {
|
43
|
-
return this.#
|
43
|
+
return this.#mainStorageKey;
|
44
44
|
}
|
45
45
|
|
46
46
|
setMainStorageKey(storageKey: string): void {
|
47
|
-
this.#
|
47
|
+
this.#mainStorageKey = storageKey;
|
48
48
|
this.dispatchEventToListeners(Events.MAIN_STORAGE_KEY_CHANGED, {
|
49
|
-
mainStorageKey: this.#
|
49
|
+
mainStorageKey: this.#mainStorageKey,
|
50
50
|
});
|
51
51
|
}
|
52
52
|
}
|
@@ -11,14 +11,14 @@ import {SDKModel} from './SDKModel.js';
|
|
11
11
|
import type {TargetManager} from './TargetManager.js';
|
12
12
|
|
13
13
|
export class Target extends ProtocolClient.InspectorBackend.TargetBase {
|
14
|
-
readonly #
|
15
|
-
#
|
16
|
-
#
|
14
|
+
readonly #targetManager: TargetManager;
|
15
|
+
#name: string;
|
16
|
+
#inspectedURL: Platform.DevToolsPath.UrlString = Platform.DevToolsPath.EmptyUrlString;
|
17
17
|
#inspectedURLName = '';
|
18
18
|
readonly #capabilitiesMask: number;
|
19
|
-
#
|
20
|
-
readonly #
|
21
|
-
#
|
19
|
+
#type: Type;
|
20
|
+
readonly #parentTarget: Target|null;
|
21
|
+
#id: Protocol.Target.TargetID|'main';
|
22
22
|
#modelByConstructor = new Map<new(arg1: Target) => SDKModel, SDKModel>();
|
23
23
|
#isSuspended: boolean;
|
24
24
|
/**
|
@@ -33,7 +33,7 @@ export class Target extends ProtocolClient.InspectorBackend.TargetBase {
|
|
33
33
|
* crbug.com/387258086).
|
34
34
|
*/
|
35
35
|
#hasCrashed = false;
|
36
|
-
#
|
36
|
+
#targetInfo: Protocol.Target.TargetInfo|undefined;
|
37
37
|
#creatingModels?: boolean;
|
38
38
|
|
39
39
|
constructor(
|
@@ -42,8 +42,8 @@ export class Target extends ProtocolClient.InspectorBackend.TargetBase {
|
|
42
42
|
connection: ProtocolClient.InspectorBackend.Connection|null, targetInfo?: Protocol.Target.TargetInfo) {
|
43
43
|
const needsNodeJSPatching = type === Type.NODE;
|
44
44
|
super(needsNodeJSPatching, parentTarget, sessionId, connection);
|
45
|
-
this.#
|
46
|
-
this.#
|
45
|
+
this.#targetManager = targetManager;
|
46
|
+
this.#name = name;
|
47
47
|
this.#capabilitiesMask = 0;
|
48
48
|
switch (type) {
|
49
49
|
case Type.FRAME:
|
@@ -99,11 +99,11 @@ export class Target extends ProtocolClient.InspectorBackend.TargetBase {
|
|
99
99
|
case Type.NODE_WORKER:
|
100
100
|
this.#capabilitiesMask = Capability.JS | Capability.NETWORK | Capability.TARGET | Capability.IO;
|
101
101
|
}
|
102
|
-
this.#
|
103
|
-
this.#
|
104
|
-
this.#
|
102
|
+
this.#type = type;
|
103
|
+
this.#parentTarget = parentTarget;
|
104
|
+
this.#id = id;
|
105
105
|
this.#isSuspended = suspended;
|
106
|
-
this.#
|
106
|
+
this.#targetInfo = targetInfo;
|
107
107
|
}
|
108
108
|
|
109
109
|
createModels(required: Set<new(arg1: Target) => SDKModel>): void {
|
@@ -125,32 +125,32 @@ export class Target extends ProtocolClient.InspectorBackend.TargetBase {
|
|
125
125
|
}
|
126
126
|
|
127
127
|
id(): Protocol.Target.TargetID|'main' {
|
128
|
-
return this.#
|
128
|
+
return this.#id;
|
129
129
|
}
|
130
130
|
|
131
131
|
name(): string {
|
132
|
-
return this.#
|
132
|
+
return this.#name || this.#inspectedURLName;
|
133
133
|
}
|
134
134
|
|
135
135
|
setName(name: string): void {
|
136
|
-
if (this.#
|
136
|
+
if (this.#name === name) {
|
137
137
|
return;
|
138
138
|
}
|
139
|
-
this.#
|
140
|
-
this.#
|
139
|
+
this.#name = name;
|
140
|
+
this.#targetManager.onNameChange(this);
|
141
141
|
}
|
142
142
|
|
143
143
|
type(): Type {
|
144
|
-
return this.#
|
144
|
+
return this.#type;
|
145
145
|
}
|
146
146
|
|
147
147
|
override markAsNodeJSForTest(): void {
|
148
148
|
super.markAsNodeJSForTest();
|
149
|
-
this.#
|
149
|
+
this.#type = Type.NODE;
|
150
150
|
}
|
151
151
|
|
152
152
|
targetManager(): TargetManager {
|
153
|
-
return this.#
|
153
|
+
return this.#targetManager;
|
154
154
|
}
|
155
155
|
|
156
156
|
hasAllCapabilities(capabilitiesMask: number): boolean {
|
@@ -160,12 +160,11 @@ export class Target extends ProtocolClient.InspectorBackend.TargetBase {
|
|
160
160
|
}
|
161
161
|
|
162
162
|
decorateLabel(label: string): string {
|
163
|
-
return (this.#
|
164
|
-
label;
|
163
|
+
return (this.#type === Type.Worker || this.#type === Type.ServiceWorker) ? '\u2699 ' + label : label;
|
165
164
|
}
|
166
165
|
|
167
166
|
parentTarget(): Target|null {
|
168
|
-
return this.#
|
167
|
+
return this.#parentTarget;
|
169
168
|
}
|
170
169
|
|
171
170
|
outermostTarget(): Target|null {
|
@@ -183,7 +182,7 @@ export class Target extends ProtocolClient.InspectorBackend.TargetBase {
|
|
183
182
|
|
184
183
|
override dispose(reason: string): void {
|
185
184
|
super.dispose(reason);
|
186
|
-
this.#
|
185
|
+
this.#targetManager.removeTarget(this);
|
187
186
|
for (const model of this.#modelByConstructor.values()) {
|
188
187
|
model.dispose();
|
189
188
|
}
|
@@ -199,7 +198,7 @@ export class Target extends ProtocolClient.InspectorBackend.TargetBase {
|
|
199
198
|
const model = new modelClass(this);
|
200
199
|
this.#modelByConstructor.set(modelClass, model);
|
201
200
|
if (!this.#creatingModels) {
|
202
|
-
this.#
|
201
|
+
this.#targetManager.modelAdded(modelClass, model, this.#targetManager.isInScope(this));
|
203
202
|
}
|
204
203
|
}
|
205
204
|
}
|
@@ -211,16 +210,16 @@ export class Target extends ProtocolClient.InspectorBackend.TargetBase {
|
|
211
210
|
}
|
212
211
|
|
213
212
|
inspectedURL(): Platform.DevToolsPath.UrlString {
|
214
|
-
return this.#
|
213
|
+
return this.#inspectedURL;
|
215
214
|
}
|
216
215
|
|
217
216
|
setInspectedURL(inspectedURL: Platform.DevToolsPath.UrlString): void {
|
218
|
-
this.#
|
217
|
+
this.#inspectedURL = inspectedURL;
|
219
218
|
const parsedURL = Common.ParsedURL.ParsedURL.fromString(inspectedURL);
|
220
|
-
this.#inspectedURLName = parsedURL ? parsedURL.lastPathComponentWithFragment() : '#' + this.#
|
221
|
-
this.#
|
222
|
-
if (!this.#
|
223
|
-
this.#
|
219
|
+
this.#inspectedURLName = parsedURL ? parsedURL.lastPathComponentWithFragment() : '#' + this.#id;
|
220
|
+
this.#targetManager.onInspectedURLChange(this);
|
221
|
+
if (!this.#name) {
|
222
|
+
this.#targetManager.onNameChange(this);
|
224
223
|
}
|
225
224
|
}
|
226
225
|
|
@@ -277,11 +276,11 @@ export class Target extends ProtocolClient.InspectorBackend.TargetBase {
|
|
277
276
|
}
|
278
277
|
|
279
278
|
updateTargetInfo(targetInfo: Protocol.Target.TargetInfo): void {
|
280
|
-
this.#
|
279
|
+
this.#targetInfo = targetInfo;
|
281
280
|
}
|
282
281
|
|
283
282
|
targetInfo(): Protocol.Target.TargetInfo|undefined {
|
284
|
-
return this.#
|
283
|
+
return this.#targetInfo;
|
285
284
|
}
|
286
285
|
}
|
287
286
|
|