chrome-devtools-frontend 1.0.1652307 → 1.0.1656291
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/.agents/skills/fixing-skipped-tests/SKILL.md +32 -0
- package/.agents/skills/migrate-chromium-test/SKILL.md +144 -0
- package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +116 -0
- package/.agents/skills/ui-eng-vision-logic-consolidator/SKILL.md +82 -0
- package/.agents/skills/ui-eng-vision-orchestrator/SKILL.md +123 -0
- package/.agents/skills/ui-eng-vision-test-scaffolder/SKILL.md +125 -0
- package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +75 -0
- package/AUTHORS +1 -0
- package/config/owner/COMMON_OWNERS +0 -4
- package/docs/get_the_code.md +1 -2
- package/docs/playbook.md +1 -1
- package/docs/ui_engineering.md +3 -1
- package/eslint.config.mjs +0 -5
- package/front_end/Tests.js +1 -0
- package/front_end/core/common/Settings.ts +47 -30
- package/front_end/core/sdk/CPUThrottlingManager.ts +23 -167
- package/front_end/core/sdk/CSSMetadata.ts +23 -0
- package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +8 -4
- package/front_end/core/sdk/ConsoleModel.ts +13 -11
- package/front_end/core/sdk/DOMDebuggerModel.ts +11 -5
- package/front_end/core/sdk/DOMModel.ts +4 -0
- package/front_end/core/sdk/EmulationModel.ts +4 -0
- package/front_end/core/sdk/EventBreakpointsModel.ts +9 -5
- package/front_end/core/sdk/IsolateManager.ts +6 -6
- package/front_end/core/sdk/ResourceTreeModel.ts +8 -5
- package/front_end/core/sdk/TargetManager.ts +17 -0
- package/front_end/entrypoints/devtools_app/devtools_app.ts +0 -1
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +459 -74
- package/front_end/entrypoints/main/MainImpl.ts +12 -42
- package/front_end/foundation/Universe.ts +116 -3
- package/front_end/generated/InspectorBackendCommands.ts +11 -6
- package/front_end/generated/SupportedCSSProperties.js +124 -34
- package/front_end/generated/protocol-mapping.d.ts +8 -0
- package/front_end/generated/protocol-proxy-api.d.ts +15 -0
- package/front_end/generated/protocol.ts +94 -1
- package/front_end/models/ai_assistance/AiConversation.ts +2 -7
- package/front_end/models/ai_assistance/README.md +4 -3
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +1 -1
- package/front_end/models/ai_assistance/agents/NetworkAgent.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +2 -2
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +13 -320
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +0 -24
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +2 -358
- package/front_end/models/ai_assistance/ai_assistance.ts +6 -8
- package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +295 -0
- package/front_end/models/ai_assistance/contexts/RequestContext.snapshot.txt +0 -1
- package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +0 -2
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +10 -10
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +12 -11
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +6 -6
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +1 -14
- package/front_end/models/ai_assistance/skills/accessibility.md +4 -2
- package/front_end/models/ai_assistance/tools/GetElementAccessibilityDetails.ts +142 -0
- package/front_end/models/ai_assistance/tools/GetStyles.ts +1 -1
- package/front_end/models/ai_assistance/tools/README.md +21 -1
- package/front_end/models/ai_assistance/tools/{ResolveLighthousePath.ts → ResolveDevtoolsNodePath.ts} +18 -17
- package/front_end/models/ai_assistance/tools/Tool.ts +6 -1
- package/front_end/models/ai_assistance/tools/ToolRegistry.ts +4 -2
- package/front_end/models/autofill_manager/AutofillManager.ts +6 -15
- package/front_end/models/bindings/NetworkProject.ts +4 -8
- package/front_end/models/breakpoints/BreakpointManager.ts +9 -9
- package/front_end/models/emulation/DeviceModeModel.ts +24 -0
- package/front_end/models/emulation/EmulatedDevices.ts +108 -0
- package/front_end/models/heap_snapshot/HeapSnapshotModel.ts +36 -0
- package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +8 -0
- package/front_end/models/issues_manager/IssuesManager.ts +10 -6
- package/front_end/models/javascript_metadata/JavaScriptMetadata.ts +4 -5
- package/front_end/models/javascript_metadata/NativeFunctions.js +1 -1
- package/front_end/models/live-metrics/LiveMetrics.ts +6 -6
- package/front_end/models/live-metrics/web-vitals-injected/spec/spec.ts +5 -5
- package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +3 -3
- package/front_end/models/logs/LogManager.ts +25 -10
- package/front_end/models/logs/NetworkLog.ts +24 -19
- package/front_end/models/persistence/AutomaticFileSystemManager.ts +14 -13
- package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +26 -14
- package/front_end/models/persistence/IsolatedFileSystem.ts +9 -11
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +22 -11
- package/front_end/models/persistence/NetworkPersistenceManager.ts +73 -44
- package/front_end/models/persistence/PersistenceImpl.ts +4 -5
- package/front_end/models/project_settings/ProjectSettingsModel.ts +12 -11
- package/front_end/models/trace/EntityMapper.ts +1 -1
- package/front_end/models/trace/handlers/ScreenshotsHandler.ts +14 -59
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +12 -38
- package/front_end/panels/ai_assistance/ExportConversation.ts +4 -1
- package/front_end/panels/ai_assistance/components/ChatInput.ts +2 -2
- package/front_end/panels/application/DeviceBoundSessionsView.ts +15 -3
- package/front_end/panels/application/FrameDetailsView.ts +2 -1
- package/front_end/panels/application/IndexedDBViews.ts +38 -36
- package/front_end/panels/application/ServiceWorkersView.ts +23 -16
- package/front_end/panels/application/components/AdsView.ts +4 -0
- package/front_end/panels/autofill/AutofillView.ts +1 -1
- package/front_end/panels/autofill/autofill-meta.ts +3 -2
- package/front_end/panels/common/CPUThrottlingOption.ts +142 -0
- package/front_end/panels/common/ThrottlingUtils.ts +9 -4
- package/front_end/panels/common/common.ts +1 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +45 -0
- package/front_end/panels/elements/AccessibilityTreeUtils.ts +26 -15
- package/front_end/panels/elements/AccessibilityTreeView.ts +12 -9
- package/front_end/panels/elements/ElementsPanel.ts +0 -74
- package/front_end/panels/elements/ElementsTreeOutline.ts +5 -4
- package/front_end/panels/emulation/DeviceModeToolbar.ts +46 -45
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +118 -68
- package/front_end/panels/layer_viewer/Layers3DView.ts +1 -1
- package/front_end/panels/layer_viewer/layerTreeOutline.css +20 -13
- package/front_end/panels/layers/LayersPanel.ts +1 -1
- package/front_end/panels/mobile_throttling/CalibrationController.ts +6 -5
- package/front_end/panels/mobile_throttling/MobileThrottlingSelector.ts +1 -1
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +40 -13
- package/front_end/panels/mobile_throttling/ThrottlingPresets.ts +13 -17
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +79 -30
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +5 -0
- package/front_end/panels/network/LinkPreloadGenerator.ts +101 -0
- package/front_end/panels/network/NetworkLogView.ts +28 -9
- package/front_end/panels/network/NetworkPanel.ts +1 -63
- package/front_end/panels/network/RequestInitiatorView.ts +29 -4
- package/front_end/panels/network/components/HeaderSectionRow.css +9 -7
- package/front_end/panels/network/components/HeaderSectionRow.ts +20 -1
- package/front_end/panels/network/components/RequestHeaderSection.css +5 -3
- package/front_end/panels/network/components/RequestHeaderSection.ts +1 -2
- package/front_end/panels/network/components/RequestHeadersView.css +1 -1
- package/front_end/panels/network/network.ts +2 -0
- package/front_end/panels/profiler/HeapSnapshotView.ts +121 -33
- package/front_end/panels/profiler/ModuleUIStrings.ts +4 -0
- package/front_end/panels/security/SecurityPanel.ts +36 -23
- package/front_end/panels/settings/SettingsScreen.ts +18 -103
- package/front_end/panels/settings/settings-meta.ts +0 -24
- package/front_end/panels/timeline/TimelineController.ts +3 -2
- package/front_end/panels/timeline/TimelineHistoryManager.ts +38 -37
- package/front_end/panels/timeline/TimelinePanel.ts +52 -11
- package/front_end/panels/timeline/components/CPUThrottlingSelector.ts +20 -18
- package/front_end/panels/timeline/components/LiveMetricsView.ts +38 -38
- package/front_end/panels/timeline/components/MetricCard.ts +18 -18
- package/front_end/panels/timeline/components/liveMetricsView.css +6 -6
- package/front_end/panels/timeline/components/metricCard.css +4 -4
- package/front_end/panels/timeline/timelineFlamechartPopover.css +2 -0
- package/front_end/panels/utils/utils.ts +25 -24
- package/front_end/panels/whats_new/ReleaseNoteText.ts +3 -3
- package/front_end/panels/whats_new/resources/WNDT.md +1 -1
- 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/es5-iife/puppeteer-core-browser.d.ts +34 -55
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +96 -83
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts +10 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/CDPSession.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/CDPSession.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Target.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Target.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.js +2 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js +5 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js +23 -13
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.js +4 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Input.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/LifecycleWatcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/LifecycleWatcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.d.ts +3 -41
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js +4 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/LaunchOptions.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/LaunchOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/httpUtils.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/httpUtils.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/httpUtils.js +5 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/httpUtils.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +34 -55
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +13 -1
- package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +2 -3
- package/front_end/third_party/puppeteer/package/src/api/CDPSession.ts +3 -1
- package/front_end/third_party/puppeteer/package/src/api/HTTPResponse.ts +3 -2
- package/front_end/third_party/puppeteer/package/src/api/Realm.ts +1 -2
- package/front_end/third_party/puppeteer/package/src/api/Target.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/api/locators/locators.ts +1 -2
- package/front_end/third_party/puppeteer/package/src/bidi/HTTPResponse.ts +3 -1
- package/front_end/third_party/puppeteer/package/src/bidi/core/Realm.ts +1 -3
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +13 -3
- package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/cdp/FrameManager.ts +24 -13
- package/front_end/third_party/puppeteer/package/src/cdp/HTTPResponse.ts +4 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Input.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/cdp/LifecycleWatcher.ts +1 -4
- package/front_end/third_party/puppeteer/package/src/cdp/Target.ts +2 -4
- package/front_end/third_party/puppeteer/package/src/cdp/WebMCP.ts +7 -76
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +1 -4
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +4 -1
- package/front_end/third_party/puppeteer/package/src/node/LaunchOptions.ts +5 -0
- package/front_end/third_party/puppeteer/package/src/revisions.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/util/httpUtils.ts +5 -5
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/third_party/parsel/README.chromium +1 -1
- package/front_end/ui/components/dialogs/Dialog.ts +3 -0
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +0 -7
- package/front_end/ui/helpers/OpenInNewTab.ts +15 -7
- package/front_end/ui/legacy/InspectorDrawerView.ts +7 -5
- package/front_end/ui/legacy/ListWidget.ts +12 -0
- package/front_end/ui/legacy/SplitWidget.ts +12 -11
- package/front_end/ui/legacy/TabbedPane.ts +1 -108
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +9 -0
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +192 -139
- package/front_end/ui/legacy/components/data_grid/DataGridExporter.ts +89 -0
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +10 -0
- package/front_end/ui/legacy/components/data_grid/data_grid.ts +3 -1
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +8 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +110 -17
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +89 -40
- package/front_end/ui/legacy/treeoutline.css +1 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
- package/package.json +4 -3
- package/front_end/Images/navigationControls.png +0 -0
- package/front_end/Images/navigationControls_2x.png +0 -0
- package/front_end/Images/popoverArrows.png +0 -0
- package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +0 -746
- package/front_end/entrypoints/greendev_floaty/floaty.css +0 -301
- package/front_end/entrypoints/greendev_floaty/floaty.html +0 -38
- package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +0 -415
- package/front_end/models/ai_assistance/agents/GreenDevAgent.ts +0 -834
- package/front_end/models/ai_assistance/agents/GreenDevAgentAntigravityCliSocketClient.ts +0 -53
- package/front_end/models/ai_assistance/agents/GreenDevAgentGeminiCliSocketClient.ts +0 -117
- package/front_end/models/annotations/AnnotationRepository.ts +0 -238
- package/front_end/models/annotations/AnnotationType.ts +0 -10
- package/front_end/models/annotations/README.md +0 -7
- package/front_end/models/annotations/annotations.ts +0 -6
- package/front_end/models/greendev/Prototypes.ts +0 -68
- package/front_end/models/greendev/README.md +0 -5
- package/front_end/models/greendev/greendev.ts +0 -5
- package/front_end/panels/common/Annotation.ts +0 -184
- package/front_end/panels/common/AnnotationManager.ts +0 -208
- package/front_end/panels/common/annotation.css +0 -40
- package/front_end/panels/greendev/GreenDevPanel.css +0 -282
- package/front_end/panels/greendev/GreenDevPanel.ts +0 -364
- package/front_end/panels/greendev/GreenDevShared.ts +0 -13
- package/front_end/panels/greendev/greendev-meta.ts +0 -52
- package/front_end/panels/greendev/greendev.ts +0 -9
|
@@ -316,4 +316,40 @@ export interface DuplicateStringGroup {
|
|
|
316
316
|
distance: number,
|
|
317
317
|
}>;
|
|
318
318
|
truncated?: boolean;
|
|
319
|
+
length?: number;
|
|
320
|
+
hash?: number;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
export interface NativeContextSize {
|
|
324
|
+
nodeId: number;
|
|
325
|
+
nodeIndex: number;
|
|
326
|
+
nodeName: string;
|
|
327
|
+
attributedSize: number;
|
|
328
|
+
retainedSize: number;
|
|
329
|
+
selfSize: number;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export interface NativeContextSizes {
|
|
333
|
+
nativeContexts: NativeContextSize[];
|
|
334
|
+
sharedSize: number;
|
|
335
|
+
noAttributionSize: number;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export const enum DOMLinkState {
|
|
339
|
+
UNKNOWN = 0,
|
|
340
|
+
ATTACHED = 1,
|
|
341
|
+
DETACHED = 2,
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
export interface ObjectInfo {
|
|
345
|
+
id: number;
|
|
346
|
+
name: string;
|
|
347
|
+
type: string;
|
|
348
|
+
nodeIndex: number;
|
|
349
|
+
detachedness: DOMLinkState;
|
|
350
|
+
selfSize: number;
|
|
351
|
+
retainedSize: number;
|
|
352
|
+
distance: number;
|
|
353
|
+
edgeCount: number;
|
|
354
|
+
retainerCount: number;
|
|
319
355
|
}
|
|
@@ -267,6 +267,10 @@ export class HeapSnapshotProxy extends HeapSnapshotProxyObject {
|
|
|
267
267
|
return this.callMethodPromise('interfaceDefinitions');
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
+
getNativeContextSizes(): Promise<HeapSnapshotModel.NativeContextSizes> {
|
|
271
|
+
return this.callMethodPromise('getNativeContextSizes');
|
|
272
|
+
}
|
|
273
|
+
|
|
270
274
|
aggregatesWithFilter(filter: HeapSnapshotModel.NodeFilter):
|
|
271
275
|
Promise<Record<string, HeapSnapshotModel.AggregatedInfo>> {
|
|
272
276
|
return this.callMethodPromise('aggregatesWithFilter', filter);
|
|
@@ -295,6 +299,10 @@ export class HeapSnapshotProxy extends HeapSnapshotProxyObject {
|
|
|
295
299
|
return this.callMethodPromise('nodeIndexForId', nodeId);
|
|
296
300
|
}
|
|
297
301
|
|
|
302
|
+
getObjectInfo(nodeIndex: number): Promise<HeapSnapshotModel.ObjectInfo> {
|
|
303
|
+
return this.callMethodPromise('getObjectInfo', nodeIndex);
|
|
304
|
+
}
|
|
305
|
+
|
|
298
306
|
createEdgesProvider(nodeIndex: number): HeapSnapshotProviderProxy {
|
|
299
307
|
return this.callFactoryMethod('createEdgesProvider', HeapSnapshotProviderProxy, nodeIndex);
|
|
300
308
|
}
|
|
@@ -180,6 +180,7 @@ export function createIssuesFromProtocolIssue(
|
|
|
180
180
|
|
|
181
181
|
export interface IssuesManagerCreationOptions {
|
|
182
182
|
forceNew: boolean;
|
|
183
|
+
frameManager?: SDK.FrameManager.FrameManager;
|
|
183
184
|
/** Throw an error if this is not the first instance created */
|
|
184
185
|
ensureFirst: boolean;
|
|
185
186
|
showThirdPartyIssuesSetting?: Common.Settings.Setting<boolean>;
|
|
@@ -224,18 +225,20 @@ export class IssuesManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
|
|
|
224
225
|
#thirdPartyCookiePhaseoutIssueCount = new Map<IssueKind, number>();
|
|
225
226
|
#issuesById = new Map<string, Issue>();
|
|
226
227
|
#issuesByOutermostTarget: WeakMap<SDK.Target.Target, Set<Issue>> = new Map();
|
|
228
|
+
#frameManager: SDK.FrameManager.FrameManager;
|
|
227
229
|
|
|
228
|
-
constructor(
|
|
229
|
-
|
|
230
|
-
|
|
230
|
+
constructor(private readonly showThirdPartyIssuesSetting?: Common.Settings.Setting<boolean>,
|
|
231
|
+
private readonly hideIssueSetting?: Common.Settings.Setting<HideIssueMenuSetting>,
|
|
232
|
+
frameManager: SDK.FrameManager.FrameManager = SDK.FrameManager.FrameManager.instance()) {
|
|
231
233
|
super();
|
|
234
|
+
this.#frameManager = frameManager;
|
|
232
235
|
new SourceFrameIssuesManager(this);
|
|
233
236
|
SDK.TargetManager.TargetManager.instance().observeModels(SDK.IssuesModel.IssuesModel, this);
|
|
234
237
|
SDK.TargetManager.TargetManager.instance().addModelListener(
|
|
235
238
|
SDK.ResourceTreeModel.ResourceTreeModel, SDK.ResourceTreeModel.Events.PrimaryPageChanged,
|
|
236
239
|
this.#onPrimaryPageChanged, this);
|
|
237
|
-
SDK.FrameManager.
|
|
238
|
-
|
|
240
|
+
this.#frameManager.addEventListener(SDK.FrameManager.Events.FRAME_ADDED_TO_TARGET, this.#onFrameAddedToTarget,
|
|
241
|
+
this);
|
|
239
242
|
|
|
240
243
|
// issueFilter uses the 'show-third-party-issues' setting. Clients of IssuesManager need
|
|
241
244
|
// a full update when the setting changes to get an up-to-date issues list.
|
|
@@ -263,7 +266,8 @@ export class IssuesManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
|
|
|
263
266
|
}
|
|
264
267
|
|
|
265
268
|
if (!issuesManagerInstance || opts.forceNew) {
|
|
266
|
-
issuesManagerInstance =
|
|
269
|
+
issuesManagerInstance =
|
|
270
|
+
new IssuesManager(opts.showThirdPartyIssuesSetting, opts.hideIssueSetting, opts.frameManager);
|
|
267
271
|
}
|
|
268
272
|
|
|
269
273
|
return issuesManagerInstance;
|
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import type * as Common from '../../core/common/common.js';
|
|
6
|
+
import * as Root from '../../core/root/root.js';
|
|
6
7
|
|
|
7
8
|
import {NativeFunctions} from './NativeFunctions.js';
|
|
8
9
|
|
|
9
|
-
let javaScriptMetadataInstance: JavaScriptMetadataImpl;
|
|
10
|
-
|
|
11
10
|
export class JavaScriptMetadataImpl implements Common.JavaScriptMetaData.JavaScriptMetaData {
|
|
12
11
|
private readonly uniqueFunctions: Map<string, string[][]>;
|
|
13
12
|
private readonly receiverMethods: Map<string, Map<string, string[][]>>;
|
|
@@ -15,11 +14,11 @@ export class JavaScriptMetadataImpl implements Common.JavaScriptMetaData.JavaScr
|
|
|
15
14
|
forceNew: boolean|null,
|
|
16
15
|
} = {forceNew: null}): JavaScriptMetadataImpl {
|
|
17
16
|
const {forceNew} = opts;
|
|
18
|
-
if (!
|
|
19
|
-
|
|
17
|
+
if (!Root.DevToolsContext.globalInstance().has(JavaScriptMetadataImpl) || forceNew) {
|
|
18
|
+
Root.DevToolsContext.globalInstance().set(JavaScriptMetadataImpl, new JavaScriptMetadataImpl());
|
|
20
19
|
}
|
|
21
20
|
|
|
22
|
-
return
|
|
21
|
+
return Root.DevToolsContext.globalInstance().get(JavaScriptMetadataImpl);
|
|
23
22
|
}
|
|
24
23
|
constructor() {
|
|
25
24
|
this.uniqueFunctions = new Map();
|
|
@@ -291,7 +291,7 @@ export class LiveMetrics extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
|
291
291
|
const warnings: string[] = [];
|
|
292
292
|
const lcpEvent: LcpValue = {
|
|
293
293
|
value: webVitalsEvent.value,
|
|
294
|
-
|
|
294
|
+
subparts: webVitalsEvent.subparts,
|
|
295
295
|
warnings,
|
|
296
296
|
};
|
|
297
297
|
if (webVitalsEvent.nodeIndex !== undefined) {
|
|
@@ -323,7 +323,7 @@ export class LiveMetrics extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
|
323
323
|
case 'INP': {
|
|
324
324
|
const inpEvent: InpValue = {
|
|
325
325
|
value: webVitalsEvent.value,
|
|
326
|
-
|
|
326
|
+
subparts: webVitalsEvent.subparts,
|
|
327
327
|
interactionId: `interaction-${webVitalsEvent.entryGroupId}-${webVitalsEvent.startTime}`,
|
|
328
328
|
};
|
|
329
329
|
this.#inpValue = inpEvent;
|
|
@@ -345,7 +345,7 @@ export class LiveMetrics extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
|
345
345
|
interactionType: webVitalsEvent.interactionType,
|
|
346
346
|
duration: webVitalsEvent.duration,
|
|
347
347
|
eventNames: [],
|
|
348
|
-
|
|
348
|
+
subparts: webVitalsEvent.subparts,
|
|
349
349
|
startTime: webVitalsEvent.startTime,
|
|
350
350
|
nextPaintTime: webVitalsEvent.nextPaintTime,
|
|
351
351
|
longAnimationFrameTimings: webVitalsEvent.longAnimationFrameEntries,
|
|
@@ -610,12 +610,12 @@ export interface MetricValue {
|
|
|
610
610
|
}
|
|
611
611
|
|
|
612
612
|
export interface LcpValue extends MetricValue {
|
|
613
|
-
|
|
613
|
+
subparts: Spec.LcpSubparts;
|
|
614
614
|
nodeRef?: SDK.DOMModel.DOMNode;
|
|
615
615
|
}
|
|
616
616
|
|
|
617
617
|
export interface InpValue extends MetricValue {
|
|
618
|
-
|
|
618
|
+
subparts: Spec.InpSubparts;
|
|
619
619
|
interactionId: InteractionId;
|
|
620
620
|
}
|
|
621
621
|
|
|
@@ -636,7 +636,7 @@ export interface Interaction {
|
|
|
636
636
|
duration: number;
|
|
637
637
|
startTime: number;
|
|
638
638
|
nextPaintTime: number;
|
|
639
|
-
|
|
639
|
+
subparts: Spec.InpSubparts;
|
|
640
640
|
longAnimationFrameTimings: Spec.PerformanceLongAnimationFrameTimingJSON[];
|
|
641
641
|
nodeRef?: SDK.DOMModel.DOMNode;
|
|
642
642
|
}
|
|
@@ -18,14 +18,14 @@ export function getUniqueLayoutShiftId(entry: LayoutShift): UniqueLayoutShiftId
|
|
|
18
18
|
return `layout-shift-${entry.value}-${entry.startTime}`;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export interface
|
|
21
|
+
export interface LcpSubparts {
|
|
22
22
|
timeToFirstByte: Trace.Types.Timing.Milli;
|
|
23
23
|
resourceLoadDelay: Trace.Types.Timing.Milli;
|
|
24
24
|
resourceLoadTime: Trace.Types.Timing.Milli;
|
|
25
25
|
elementRenderDelay: Trace.Types.Timing.Milli;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
export interface
|
|
28
|
+
export interface InpSubparts {
|
|
29
29
|
inputDelay: Trace.Types.Timing.Milli;
|
|
30
30
|
processingDuration: Trace.Types.Timing.Milli;
|
|
31
31
|
presentationDelay: Trace.Types.Timing.Milli;
|
|
@@ -34,7 +34,7 @@ export interface InpPhases {
|
|
|
34
34
|
export interface LcpChangeEvent {
|
|
35
35
|
name: 'LCP';
|
|
36
36
|
value: Trace.Types.Timing.Milli;
|
|
37
|
-
|
|
37
|
+
subparts: LcpSubparts;
|
|
38
38
|
startedHidden: boolean;
|
|
39
39
|
nodeIndex?: number;
|
|
40
40
|
}
|
|
@@ -49,7 +49,7 @@ export interface InpChangeEvent {
|
|
|
49
49
|
name: 'INP';
|
|
50
50
|
value: Trace.Types.Timing.Milli;
|
|
51
51
|
interactionType: INPAttribution['interactionType'];
|
|
52
|
-
|
|
52
|
+
subparts: InpSubparts;
|
|
53
53
|
startTime: number;
|
|
54
54
|
entryGroupId: InteractionEntryGroupId;
|
|
55
55
|
}
|
|
@@ -95,7 +95,7 @@ export interface InteractionEntryEvent {
|
|
|
95
95
|
startTime: number;
|
|
96
96
|
nextPaintTime: number;
|
|
97
97
|
duration: Trace.Types.Timing.Milli;
|
|
98
|
-
|
|
98
|
+
subparts: InpSubparts;
|
|
99
99
|
nodeIndex?: number;
|
|
100
100
|
longAnimationFrameEntries: PerformanceLongAnimationFrameTimingJSON[];
|
|
101
101
|
}
|
|
@@ -182,7 +182,7 @@ function initialize(): void {
|
|
|
182
182
|
name: 'LCP',
|
|
183
183
|
value: metric.value as Trace.Types.Timing.Milli,
|
|
184
184
|
startedHidden: Boolean(startedHidden),
|
|
185
|
-
|
|
185
|
+
subparts: {
|
|
186
186
|
timeToFirstByte: metric.attribution.timeToFirstByte as Trace.Types.Timing.Milli,
|
|
187
187
|
resourceLoadDelay: metric.attribution.resourceLoadDelay as Trace.Types.Timing.Milli,
|
|
188
188
|
resourceLoadTime: metric.attribution.resourceLoadDuration as Trace.Types.Timing.Milli,
|
|
@@ -213,7 +213,7 @@ function initialize(): void {
|
|
|
213
213
|
const event: Spec.InteractionEntryEvent = {
|
|
214
214
|
name: 'InteractionEntry',
|
|
215
215
|
duration: interaction.value as Trace.Types.Timing.Milli,
|
|
216
|
-
|
|
216
|
+
subparts: {
|
|
217
217
|
inputDelay: interaction.attribution.inputDelay as Trace.Types.Timing.Milli,
|
|
218
218
|
processingDuration: interaction.attribution.processingDuration as Trace.Types.Timing.Milli,
|
|
219
219
|
presentationDelay: interaction.attribution.presentationDelay as Trace.Types.Timing.Milli,
|
|
@@ -238,7 +238,7 @@ function initialize(): void {
|
|
|
238
238
|
const event: Spec.InpChangeEvent = {
|
|
239
239
|
name: 'INP',
|
|
240
240
|
value: metric.value as Trace.Types.Timing.Milli,
|
|
241
|
-
|
|
241
|
+
subparts: {
|
|
242
242
|
inputDelay: metric.attribution.inputDelay as Trace.Types.Timing.Milli,
|
|
243
243
|
processingDuration: metric.attribution.processingDuration as Trace.Types.Timing.Milli,
|
|
244
244
|
presentationDelay: metric.attribution.presentationDelay as Trace.Types.Timing.Milli,
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import type * as Platform from '../../core/platform/platform.js';
|
|
7
|
+
import * as Root from '../../core/root/root.js';
|
|
7
8
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
8
9
|
import * as Protocol from '../../generated/protocol.js';
|
|
9
10
|
|
|
@@ -11,19 +12,33 @@ import {NetworkLog} from './NetworkLog.js';
|
|
|
11
12
|
|
|
12
13
|
const modelToEventListeners = new WeakMap<SDK.LogModel.LogModel, Common.EventTarget.EventDescriptor[]>();
|
|
13
14
|
|
|
14
|
-
let instance: LogManager|null = null;
|
|
15
|
-
|
|
16
15
|
export class LogManager implements SDK.TargetManager.SDKModelObserver<SDK.LogModel.LogModel> {
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
readonly #targetManager: SDK.TargetManager.TargetManager;
|
|
17
|
+
readonly #networkLog: NetworkLog;
|
|
18
|
+
|
|
19
|
+
constructor(
|
|
20
|
+
targetManager: SDK.TargetManager.TargetManager,
|
|
21
|
+
networkLog: NetworkLog,
|
|
22
|
+
) {
|
|
23
|
+
this.#targetManager = targetManager;
|
|
24
|
+
this.#networkLog = networkLog;
|
|
25
|
+
this.#targetManager.observeModels(SDK.LogModel.LogModel, this);
|
|
19
26
|
}
|
|
20
27
|
|
|
21
28
|
static instance({forceNew}: {forceNew: boolean} = {forceNew: false}): LogManager {
|
|
22
|
-
if (!
|
|
23
|
-
|
|
29
|
+
if (!Root.DevToolsContext.globalInstance().has(LogManager) || forceNew) {
|
|
30
|
+
Root.DevToolsContext.globalInstance().set(LogManager,
|
|
31
|
+
new LogManager(
|
|
32
|
+
SDK.TargetManager.TargetManager.instance(),
|
|
33
|
+
NetworkLog.instance(),
|
|
34
|
+
));
|
|
24
35
|
}
|
|
25
36
|
|
|
26
|
-
return
|
|
37
|
+
return Root.DevToolsContext.globalInstance().get(LogManager);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
static removeInstance(): void {
|
|
41
|
+
Root.DevToolsContext.globalInstance().delete(LogManager);
|
|
27
42
|
}
|
|
28
43
|
|
|
29
44
|
modelAdded(logModel: SDK.LogModel.LogModel): void {
|
|
@@ -56,7 +71,7 @@ export class LogManager implements SDK.TargetManager.SDKModelObserver<SDK.LogMod
|
|
|
56
71
|
target.model(SDK.RuntimeModel.RuntimeModel), entry.source, entry.level, entry.text, details);
|
|
57
72
|
|
|
58
73
|
if (entry.networkRequestId) {
|
|
59
|
-
|
|
74
|
+
this.#networkLog.associateConsoleMessageWithRequest(consoleMessage, entry.networkRequestId);
|
|
60
75
|
}
|
|
61
76
|
|
|
62
77
|
const consoleModel = target.model(SDK.ConsoleModel.ConsoleModel);
|
|
@@ -66,11 +81,11 @@ export class LogManager implements SDK.TargetManager.SDKModelObserver<SDK.LogMod
|
|
|
66
81
|
// user can see messages from the worker which has been already destroyed.
|
|
67
82
|
// When opening DevTools, give us some time to connect to the worker and
|
|
68
83
|
// not report the message twice if the worker is still alive.
|
|
69
|
-
if (
|
|
84
|
+
if (this.#targetManager.targetById(workerId)) {
|
|
70
85
|
return;
|
|
71
86
|
}
|
|
72
87
|
window.setTimeout(() => {
|
|
73
|
-
if (!
|
|
88
|
+
if (!this.#targetManager.targetById(workerId)) {
|
|
74
89
|
consoleModel?.addMessage(consoleMessage);
|
|
75
90
|
}
|
|
76
91
|
}, 1000);
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
7
|
import * as Platform from '../../core/platform/platform.js';
|
|
8
|
+
import * as Root from '../../core/root/root.js';
|
|
8
9
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
9
10
|
import * as Protocol from '../../generated/protocol.js';
|
|
10
11
|
|
|
@@ -18,8 +19,6 @@ const UIStrings = {
|
|
|
18
19
|
const str_ = i18n.i18n.registerUIStrings('models/logs/NetworkLog.ts', UIStrings);
|
|
19
20
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
20
21
|
|
|
21
|
-
let networkLogInstance: NetworkLog|undefined;
|
|
22
|
-
|
|
23
22
|
export class NetworkLog extends Common.ObjectWrapper.ObjectWrapper<EventTypes> implements
|
|
24
23
|
SDK.TargetManager.SDKModelObserver<SDK.NetworkManager.NetworkManager> {
|
|
25
24
|
#requests: SDK.NetworkRequest.NetworkRequest[] = [];
|
|
@@ -32,15 +31,21 @@ export class NetworkLog extends Common.ObjectWrapper.ObjectWrapper<EventTypes> i
|
|
|
32
31
|
readonly #modelListeners = new WeakMap<SDK.NetworkManager.NetworkManager, Common.EventTarget.EventDescriptor[]>();
|
|
33
32
|
readonly #initiatorData = new WeakMap<SDK.NetworkRequest.NetworkRequest, InitiatorData>();
|
|
34
33
|
#isRecording = true;
|
|
34
|
+
readonly #targetManager: SDK.TargetManager.TargetManager;
|
|
35
|
+
readonly #settings: Common.Settings.Settings;
|
|
35
36
|
|
|
36
|
-
constructor(
|
|
37
|
+
constructor(
|
|
38
|
+
targetManager: SDK.TargetManager.TargetManager = SDK.TargetManager.TargetManager.instance(),
|
|
39
|
+
settings: Common.Settings.Settings = Common.Settings.Settings.instance(),
|
|
40
|
+
) {
|
|
37
41
|
super();
|
|
42
|
+
this.#targetManager = targetManager;
|
|
43
|
+
this.#settings = settings;
|
|
38
44
|
|
|
39
|
-
|
|
40
|
-
const recordLogSetting: Common.Settings.Setting<boolean> =
|
|
41
|
-
Common.Settings.Settings.instance().moduleSetting('network-log.record-log');
|
|
45
|
+
this.#targetManager.observeModels(SDK.NetworkManager.NetworkManager, this);
|
|
46
|
+
const recordLogSetting: Common.Settings.Setting<boolean> = this.#settings.moduleSetting('network-log.record-log');
|
|
42
47
|
recordLogSetting.addChangeListener(() => {
|
|
43
|
-
const preserveLogSetting =
|
|
48
|
+
const preserveLogSetting = this.#settings.moduleSetting('network-log.preserve-log');
|
|
44
49
|
if (!preserveLogSetting.get() && recordLogSetting.get()) {
|
|
45
50
|
this.reset(true);
|
|
46
51
|
}
|
|
@@ -49,14 +54,15 @@ export class NetworkLog extends Common.ObjectWrapper.ObjectWrapper<EventTypes> i
|
|
|
49
54
|
}
|
|
50
55
|
|
|
51
56
|
static instance(): NetworkLog {
|
|
52
|
-
if (!
|
|
53
|
-
|
|
57
|
+
if (!Root.DevToolsContext.globalInstance().has(NetworkLog)) {
|
|
58
|
+
Root.DevToolsContext.globalInstance().set(NetworkLog, new NetworkLog());
|
|
54
59
|
}
|
|
55
|
-
|
|
60
|
+
|
|
61
|
+
return Root.DevToolsContext.globalInstance().get(NetworkLog);
|
|
56
62
|
}
|
|
57
63
|
|
|
58
64
|
static removeInstance(): void {
|
|
59
|
-
|
|
65
|
+
Root.DevToolsContext.globalInstance().delete(NetworkLog);
|
|
60
66
|
}
|
|
61
67
|
|
|
62
68
|
modelAdded(networkManager: SDK.NetworkManager.NetworkManager): void {
|
|
@@ -102,11 +108,10 @@ export class NetworkLog extends Common.ObjectWrapper.ObjectWrapper<EventTypes> i
|
|
|
102
108
|
}
|
|
103
109
|
this.#isRecording = enabled;
|
|
104
110
|
if (enabled) {
|
|
105
|
-
|
|
111
|
+
this.#targetManager.observeModels(SDK.NetworkManager.NetworkManager, this);
|
|
106
112
|
} else {
|
|
107
|
-
|
|
108
|
-
SDK.
|
|
109
|
-
.models(SDK.NetworkManager.NetworkManager)
|
|
113
|
+
this.#targetManager.unobserveModels(SDK.NetworkManager.NetworkManager, this);
|
|
114
|
+
this.#targetManager.models(SDK.NetworkManager.NetworkManager)
|
|
110
115
|
.forEach(this.removeNetworkManagerListeners.bind(this));
|
|
111
116
|
}
|
|
112
117
|
}
|
|
@@ -289,7 +294,7 @@ export class NetworkLog extends Common.ObjectWrapper.ObjectWrapper<EventTypes> i
|
|
|
289
294
|
}
|
|
290
295
|
|
|
291
296
|
private willReloadPage(): void {
|
|
292
|
-
if (!
|
|
297
|
+
if (!this.#settings.moduleSetting('network-log.preserve-log').get()) {
|
|
293
298
|
this.reset(true);
|
|
294
299
|
}
|
|
295
300
|
}
|
|
@@ -310,7 +315,7 @@ export class NetworkLog extends Common.ObjectWrapper.ObjectWrapper<EventTypes> i
|
|
|
310
315
|
return;
|
|
311
316
|
}
|
|
312
317
|
|
|
313
|
-
const preserveLog =
|
|
318
|
+
const preserveLog = this.#settings.moduleSetting('network-log.preserve-log').get();
|
|
314
319
|
|
|
315
320
|
const oldRequests = this.#requests;
|
|
316
321
|
const oldManagerRequests =
|
|
@@ -501,8 +506,8 @@ export class NetworkLog extends Common.ObjectWrapper.ObjectWrapper<EventTypes> i
|
|
|
501
506
|
this.#requestsSet.clear();
|
|
502
507
|
this.#requestsMap.clear();
|
|
503
508
|
this.#unresolvedPreflightRequests.clear();
|
|
504
|
-
const managers =
|
|
505
|
-
SDK.
|
|
509
|
+
const managers =
|
|
510
|
+
new Set<SDK.NetworkManager.NetworkManager>(this.#targetManager.models(SDK.NetworkManager.NetworkManager));
|
|
506
511
|
for (const manager of this.#pageLoadForManager.keys()) {
|
|
507
512
|
if (!managers.has(manager)) {
|
|
508
513
|
this.#pageLoadForManager.delete(manager);
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import * as Host from '../../core/host/host.js';
|
|
7
7
|
import type * as Platform from '../../core/platform/platform.js';
|
|
8
|
+
import * as Root from '../../core/root/root.js';
|
|
8
9
|
import * as ProjectSettings from '../project_settings/project_settings.js';
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -26,8 +27,6 @@ export interface AutomaticFileSystem {
|
|
|
26
27
|
*/
|
|
27
28
|
export type AutomaticFileSystemAvailability = 'available'|'unavailable';
|
|
28
29
|
|
|
29
|
-
let automaticFileSystemManagerInstance: AutomaticFileSystemManager|undefined;
|
|
30
|
-
|
|
31
30
|
/**
|
|
32
31
|
* Automatically connects and disconnects workspace folders.
|
|
33
32
|
*
|
|
@@ -66,9 +65,8 @@ export class AutomaticFileSystemManager extends Common.ObjectWrapper.ObjectWrapp
|
|
|
66
65
|
/**
|
|
67
66
|
* @internal
|
|
68
67
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
projectSettingsModel: ProjectSettings.ProjectSettingsModel.ProjectSettingsModel) {
|
|
68
|
+
constructor(inspectorFrontendHost: Host.InspectorFrontendHostAPI.InspectorFrontendHostAPI,
|
|
69
|
+
projectSettingsModel: ProjectSettings.ProjectSettingsModel.ProjectSettingsModel) {
|
|
72
70
|
super();
|
|
73
71
|
this.#automaticFileSystem = null;
|
|
74
72
|
this.#inspectorFrontendHost = inspectorFrontendHost;
|
|
@@ -93,27 +91,30 @@ export class AutomaticFileSystemManager extends Common.ObjectWrapper.ObjectWrapp
|
|
|
93
91
|
inspectorFrontendHost: Host.InspectorFrontendHostAPI.InspectorFrontendHostAPI|null,
|
|
94
92
|
projectSettingsModel: ProjectSettings.ProjectSettingsModel.ProjectSettingsModel|null,
|
|
95
93
|
} = {forceNew: false, inspectorFrontendHost: null, projectSettingsModel: null}): AutomaticFileSystemManager {
|
|
96
|
-
if (!
|
|
94
|
+
if (!Root.DevToolsContext.globalInstance().has(AutomaticFileSystemManager) || forceNew) {
|
|
97
95
|
if (!inspectorFrontendHost || !projectSettingsModel) {
|
|
98
96
|
throw new Error(
|
|
99
97
|
'Unable to create AutomaticFileSystemManager: ' +
|
|
100
98
|
'inspectorFrontendHost, and projectSettingsModel must be provided');
|
|
101
99
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
100
|
+
Root.DevToolsContext.globalInstance().set(
|
|
101
|
+
AutomaticFileSystemManager,
|
|
102
|
+
new AutomaticFileSystemManager(
|
|
103
|
+
inspectorFrontendHost,
|
|
104
|
+
projectSettingsModel,
|
|
105
|
+
),
|
|
105
106
|
);
|
|
106
107
|
}
|
|
107
|
-
return
|
|
108
|
+
return Root.DevToolsContext.globalInstance().get(AutomaticFileSystemManager);
|
|
108
109
|
}
|
|
109
110
|
|
|
110
111
|
/**
|
|
111
112
|
* Clears the `AutomaticFileSystemManager` singleton (if any);
|
|
112
113
|
*/
|
|
113
114
|
static removeInstance(): void {
|
|
114
|
-
if (
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
if (Root.DevToolsContext.globalInstance().has(AutomaticFileSystemManager)) {
|
|
116
|
+
Root.DevToolsContext.globalInstance().get(AutomaticFileSystemManager).#dispose();
|
|
117
|
+
Root.DevToolsContext.globalInstance().delete(AutomaticFileSystemManager);
|
|
117
118
|
}
|
|
118
119
|
}
|
|
119
120
|
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import * as Host from '../../core/host/host.js';
|
|
7
7
|
import type * as Platform from '../../core/platform/platform.js';
|
|
8
|
+
import * as Root from '../../core/root/root.js';
|
|
8
9
|
import type {ContentDataOrError} from '../text_utils/ContentData.js';
|
|
9
10
|
import type {SearchMatch} from '../text_utils/ContentProvider.js';
|
|
10
11
|
import * as Workspace from '../workspace/workspace.js';
|
|
@@ -141,14 +142,23 @@ export class FileSystem implements Workspace.Workspace.Project {
|
|
|
141
142
|
return [];
|
|
142
143
|
}
|
|
143
144
|
|
|
144
|
-
async findFilesMatchingSearchRequest(
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
145
|
+
async findFilesMatchingSearchRequest(_searchConfig: Workspace.SearchConfig.SearchConfig,
|
|
146
|
+
_filesMatchingFileQuery: Workspace.UISourceCode.UISourceCode[],
|
|
147
|
+
progress: Common.Progress.Progress):
|
|
148
|
+
Promise<Map<Workspace.UISourceCode.UISourceCode, SearchMatch[]|null>> {
|
|
149
|
+
// Defer completion to the next microtask to avoid triggering premature
|
|
150
|
+
// completion events in CompositeProgress setup loops.
|
|
151
|
+
await Promise.resolve();
|
|
152
|
+
progress.done = true;
|
|
148
153
|
return new Map();
|
|
149
154
|
}
|
|
150
155
|
|
|
151
|
-
indexContent(
|
|
156
|
+
indexContent(progress: Common.Progress.Progress): void {
|
|
157
|
+
// Defer completion to the next microtask to avoid triggering premature
|
|
158
|
+
// completion events in CompositeProgress setup loops.
|
|
159
|
+
queueMicrotask(() => {
|
|
160
|
+
progress.done = true;
|
|
161
|
+
});
|
|
152
162
|
}
|
|
153
163
|
|
|
154
164
|
uiSourceCodeForURL(_url: Platform.DevToolsPath.UrlString): Workspace.UISourceCode.UISourceCode|null {
|
|
@@ -160,8 +170,6 @@ export class FileSystem implements Workspace.Workspace.Project {
|
|
|
160
170
|
}
|
|
161
171
|
}
|
|
162
172
|
|
|
163
|
-
let automaticFileSystemWorkspaceBindingInstance: AutomaticFileSystemWorkspaceBinding|undefined;
|
|
164
|
-
|
|
165
173
|
/**
|
|
166
174
|
* Provides a transient workspace `Project` that doesn't contain any `UISourceCode`s,
|
|
167
175
|
* and only acts as a placeholder for the automatic file system, while it's not
|
|
@@ -177,7 +185,7 @@ export class AutomaticFileSystemWorkspaceBinding {
|
|
|
177
185
|
/**
|
|
178
186
|
* @internal
|
|
179
187
|
*/
|
|
180
|
-
|
|
188
|
+
constructor(
|
|
181
189
|
automaticFileSystemManager: AutomaticFileSystemManager,
|
|
182
190
|
isolatedFileSystemManager: IsolatedFileSystemManager,
|
|
183
191
|
workspace: Workspace.Workspace.WorkspaceImpl,
|
|
@@ -210,29 +218,33 @@ export class AutomaticFileSystemWorkspaceBinding {
|
|
|
210
218
|
isolatedFileSystemManager: null,
|
|
211
219
|
workspace: null,
|
|
212
220
|
}): AutomaticFileSystemWorkspaceBinding {
|
|
213
|
-
if (!
|
|
221
|
+
if (!Root.DevToolsContext.globalInstance().has(AutomaticFileSystemWorkspaceBinding) || forceNew) {
|
|
214
222
|
if (!automaticFileSystemManager || !isolatedFileSystemManager || !workspace) {
|
|
215
223
|
throw new Error(
|
|
216
224
|
'Unable to create AutomaticFileSystemWorkspaceBinding: ' +
|
|
217
225
|
'automaticFileSystemManager, isolatedFileSystemManager, ' +
|
|
218
226
|
'and workspace must be provided');
|
|
219
227
|
}
|
|
220
|
-
|
|
228
|
+
const automaticFileSystemWorkspaceBinding = new AutomaticFileSystemWorkspaceBinding(
|
|
221
229
|
automaticFileSystemManager,
|
|
222
230
|
isolatedFileSystemManager,
|
|
223
231
|
workspace,
|
|
224
232
|
);
|
|
233
|
+
Root.DevToolsContext.globalInstance().set(AutomaticFileSystemWorkspaceBinding,
|
|
234
|
+
automaticFileSystemWorkspaceBinding);
|
|
225
235
|
}
|
|
226
|
-
return
|
|
236
|
+
return Root.DevToolsContext.globalInstance().get(AutomaticFileSystemWorkspaceBinding);
|
|
227
237
|
}
|
|
228
238
|
|
|
229
239
|
/**
|
|
230
240
|
* Clears the `AutomaticFileSystemWorkspaceBinding` singleton (if any);
|
|
231
241
|
*/
|
|
232
242
|
static removeInstance(): void {
|
|
233
|
-
if (
|
|
234
|
-
|
|
235
|
-
|
|
243
|
+
if (Root.DevToolsContext.globalInstance().has(AutomaticFileSystemWorkspaceBinding)) {
|
|
244
|
+
const automaticFileSystemWorkspaceBinding =
|
|
245
|
+
Root.DevToolsContext.globalInstance().get(AutomaticFileSystemWorkspaceBinding);
|
|
246
|
+
automaticFileSystemWorkspaceBinding.#dispose();
|
|
247
|
+
Root.DevToolsContext.globalInstance().delete(AutomaticFileSystemWorkspaceBinding);
|
|
236
248
|
}
|
|
237
249
|
}
|
|
238
250
|
|
|
@@ -58,29 +58,27 @@ export class IsolatedFileSystem extends PlatformFileSystem {
|
|
|
58
58
|
readonly #initialGitFolders = new Set<Platform.DevToolsPath.EncodedPathString>();
|
|
59
59
|
private readonly fileLocks = new Map<Platform.DevToolsPath.EncodedPathString, Promise<unknown>>();
|
|
60
60
|
|
|
61
|
-
constructor(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
automatic: boolean) {
|
|
61
|
+
constructor(manager: IsolatedFileSystemManager, path: Platform.DevToolsPath.UrlString,
|
|
62
|
+
embedderPath: Platform.DevToolsPath.RawPathString, domFileSystem: FileSystem,
|
|
63
|
+
type: PlatformFileSystemType, automatic: boolean, settings: Common.Settings.Settings) {
|
|
65
64
|
super(path, type, automatic);
|
|
66
65
|
this.manager = manager;
|
|
67
66
|
this.#embedderPath = embedderPath;
|
|
68
67
|
this.domFileSystem = domFileSystem;
|
|
69
|
-
this.excludedFoldersSetting =
|
|
70
|
-
Common.Settings.Settings.instance().createLocalSetting('workspace-excluded-folders', {});
|
|
68
|
+
this.excludedFoldersSetting = settings.createLocalSetting('workspace-excluded-folders', {});
|
|
71
69
|
this.#excludedFolders = new Set(this.excludedFoldersSetting.get()[path] || []);
|
|
72
70
|
}
|
|
73
71
|
|
|
74
|
-
static async create(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
72
|
+
static async create(manager: IsolatedFileSystemManager, path: Platform.DevToolsPath.UrlString,
|
|
73
|
+
embedderPath: Platform.DevToolsPath.RawPathString, type: PlatformFileSystemType, name: string,
|
|
74
|
+
rootURL: string, automatic: boolean,
|
|
75
|
+
settings: Common.Settings.Settings): Promise<IsolatedFileSystem|null> {
|
|
78
76
|
const domFileSystem = Host.InspectorFrontendHost.InspectorFrontendHostInstance.isolatedFileSystem(name, rootURL);
|
|
79
77
|
if (!domFileSystem) {
|
|
80
78
|
return null;
|
|
81
79
|
}
|
|
82
80
|
|
|
83
|
-
const fileSystem = new IsolatedFileSystem(manager, path, embedderPath, domFileSystem, type, automatic);
|
|
81
|
+
const fileSystem = new IsolatedFileSystem(manager, path, embedderPath, domFileSystem, type, automatic, settings);
|
|
84
82
|
return await fileSystem.initializeFilePaths().then(() => fileSystem).catch(error => {
|
|
85
83
|
console.error(error);
|
|
86
84
|
return null;
|