chrome-devtools-frontend 1.0.950850 → 1.0.952284
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/config/gni/devtools_grd_files.gni +3 -3
- package/extension-api/ExtensionAPI.d.ts +1 -1
- package/front_end/.eslintrc.js +6 -0
- package/front_end/Tests.js +10 -0
- package/front_end/core/common/App.ts +0 -3
- package/front_end/core/common/AppProvider.ts +0 -3
- package/front_end/core/common/JavaScriptMetaData.ts +0 -3
- package/front_end/core/common/QueryParamHandler.ts +0 -3
- package/front_end/core/common/Runnable.ts +0 -3
- package/front_end/core/common/SimpleHistoryManager.ts +0 -3
- package/front_end/core/i18n/locales/en-US.json +183 -183
- package/front_end/core/i18n/locales/en-XL.json +183 -183
- package/front_end/core/sdk/CSSRule.ts +1 -1
- package/front_end/core/sdk/DOMModel.ts +12 -37
- package/front_end/core/sdk/OverlayModel.ts +18 -34
- package/front_end/core/sdk/OverlayPersistentHighlighter.ts +0 -12
- package/front_end/core/sdk/RuntimeModel.ts +0 -1
- package/front_end/core/sdk/SourceMap.ts +1 -1
- package/front_end/core/sdk/TracingManager.ts +0 -3
- package/front_end/entrypoints/formatter_worker/AcornTokenizer.ts +36 -36
- package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +53 -53
- package/front_end/entrypoints/formatter_worker/ESTreeWalker.ts +11 -11
- package/front_end/entrypoints/formatter_worker/FormattedContentBuilder.ts +43 -43
- package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +106 -105
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +26 -26
- package/front_end/entrypoints/heap_snapshot_worker/AllocationProfile.ts +51 -56
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +201 -204
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +84 -83
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +16 -16
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +21 -21
- package/front_end/entrypoints/main/ExecutionContextSelector.ts +30 -30
- package/front_end/entrypoints/main/MainImpl.ts +12 -12
- package/front_end/entrypoints/node_app/NodeConnectionsPanel.ts +33 -33
- package/front_end/entrypoints/node_app/NodeMain.ts +35 -35
- package/front_end/generated/InspectorBackendCommands.js +5 -1
- package/front_end/generated/protocol.d.ts +16 -0
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +0 -3
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +1 -2
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +1 -4
- package/front_end/models/bindings/FileUtils.ts +0 -4
- package/front_end/models/bindings/IgnoreListManager.ts +1 -2
- package/front_end/models/bindings/NetworkProject.ts +1 -2
- package/front_end/models/extensions/ExtensionAPI.ts +2 -2
- package/front_end/models/extensions/ExtensionTraceProvider.ts +0 -3
- package/front_end/models/issues_manager/ContentSecurityPolicyIssue.ts +6 -6
- package/front_end/models/issues_manager/ContrastCheckTrigger.ts +15 -15
- package/front_end/models/issues_manager/CorsIssue.ts +9 -9
- package/front_end/models/issues_manager/CrossOriginEmbedderPolicyIssue.ts +5 -5
- package/front_end/models/issues_manager/DeprecationIssue.ts +7 -7
- package/front_end/models/issues_manager/GenericIssue.ts +5 -5
- package/front_end/models/issues_manager/HeavyAdIssue.ts +5 -5
- package/front_end/models/issues_manager/Issue.ts +10 -10
- package/front_end/models/issues_manager/IssueResolver.ts +11 -10
- package/front_end/models/issues_manager/IssuesManager.ts +56 -56
- package/front_end/models/issues_manager/LowTextContrastIssue.ts +4 -4
- package/front_end/models/issues_manager/MixedContentIssue.ts +7 -7
- package/front_end/models/issues_manager/NavigatorUserAgentIssue.ts +7 -7
- package/front_end/models/issues_manager/QuirksModeIssue.ts +4 -4
- package/front_end/models/issues_manager/SameSiteCookieIssue.ts +17 -18
- package/front_end/models/issues_manager/SharedArrayBufferIssue.ts +5 -5
- package/front_end/models/issues_manager/SourceFrameIssuesManager.ts +32 -31
- package/front_end/models/issues_manager/TrustedWebActivityIssue.ts +5 -5
- package/front_end/models/issues_manager/WasmCrossOriginModuleSharingIssue.ts +5 -5
- package/front_end/models/timeline_model/TimelineModel.ts +1 -1
- package/front_end/models/timeline_model/TracingLayerTree.ts +0 -1
- package/front_end/panels/accessibility/ARIAMetadata.ts +0 -1
- package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +2 -2
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +1 -2
- package/front_end/panels/animation/AnimationTimeline.ts +0 -1
- package/front_end/panels/application/ApplicationPanelCacheSection.ts +3 -4
- package/front_end/panels/application/ServiceWorkerUpdateCycleView.ts +0 -2
- package/front_end/panels/application/StorageView.ts +2 -6
- package/front_end/panels/application/{BackForwardCacheStrings.ts → components/BackForwardCacheStrings.ts} +2 -2
- package/front_end/panels/application/{BackForwardCacheView.ts → components/BackForwardCacheView.ts} +96 -62
- package/front_end/panels/application/components/EndpointsGrid.ts +12 -12
- package/front_end/panels/application/components/FrameDetailsView.ts +108 -110
- package/front_end/panels/application/components/OriginTrialTreeView.ts +45 -45
- package/front_end/panels/application/components/PermissionsPolicySection.ts +19 -19
- package/front_end/panels/application/components/ReportsGrid.ts +30 -30
- package/front_end/panels/application/components/StackTrace.ts +48 -47
- package/front_end/panels/application/components/TrustTokensView.ts +31 -31
- package/front_end/panels/application/{backForwardCacheView.css → components/backForwardCacheView.css} +9 -0
- package/front_end/panels/application/components/components.ts +2 -0
- package/front_end/panels/console/ConsoleViewMessage.ts +1 -25
- package/front_end/panels/console/consoleView.css +5 -0
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +41 -52
- package/front_end/panels/css_overview/CSSOverviewController.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +18 -27
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +6 -6
- package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +4 -4
- package/front_end/panels/elements/ComputedStyleModel.ts +2 -2
- package/front_end/panels/elements/ElementsPanel.ts +1 -5
- package/front_end/panels/elements/ElementsTreeElement.ts +2 -6
- package/front_end/panels/elements/ElementsTreeOutline.ts +2 -2
- package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
- package/front_end/panels/elements/components/AccessibilityTreeNode.ts +17 -17
- package/front_end/panels/elements/components/AdornerManager.ts +21 -21
- package/front_end/panels/elements/components/AdornerSettingsPane.ts +14 -14
- package/front_end/panels/elements/components/CSSQuery.ts +16 -16
- package/front_end/panels/elements/components/ComputedStyleProperty.ts +14 -14
- package/front_end/panels/elements/components/ComputedStyleTrace.ts +15 -15
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +78 -78
- package/front_end/panels/elements/components/ElementsPanelLink.ts +16 -16
- package/front_end/panels/elements/components/LayoutPane.ts +47 -47
- package/front_end/panels/elements/components/NodeText.ts +18 -18
- package/front_end/panels/elements/components/QueryContainer.ts +40 -40
- package/front_end/panels/elements/components/StylePropertyEditor.ts +18 -18
- package/front_end/panels/emulation/components/DeviceSizeInputElement.ts +4 -4
- package/front_end/panels/event_listeners/EventListenersUtils.ts +2 -1
- package/front_end/panels/issues/AffectedBlockedByResponseView.ts +4 -4
- package/front_end/panels/issues/AffectedCookiesView.ts +4 -5
- package/front_end/panels/issues/AffectedDirectivesView.ts +19 -19
- package/front_end/panels/issues/AffectedDocumentsInQuirksModeView.ts +7 -8
- package/front_end/panels/issues/AffectedElementsView.ts +4 -4
- package/front_end/panels/issues/AffectedElementsWithLowContrastView.ts +7 -8
- package/front_end/panels/issues/AffectedHeavyAdView.ts +8 -8
- package/front_end/panels/issues/AffectedResourcesView.ts +25 -26
- package/front_end/panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts +8 -8
- package/front_end/panels/issues/AffectedSourcesView.ts +4 -4
- package/front_end/panels/issues/AffectedTrustedWebActivityIssueDetailsView.ts +4 -4
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +17 -17
- package/front_end/panels/issues/CSPViolationsListView.ts +22 -23
- package/front_end/panels/issues/CSPViolationsView.ts +17 -17
- package/front_end/panels/issues/ComboBoxOfCheckBoxes.ts +13 -13
- package/front_end/panels/issues/CorsIssueDetailsView.ts +23 -23
- package/front_end/panels/issues/GenericIssueDetailsView.ts +4 -4
- package/front_end/panels/issues/HiddenIssuesRow.ts +7 -7
- package/front_end/panels/issues/IssueAggregator.ts +95 -95
- package/front_end/panels/issues/IssueKindView.ts +14 -14
- package/front_end/panels/issues/IssueView.ts +98 -98
- package/front_end/panels/issues/IssuesPane.ts +102 -102
- package/front_end/panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts +5 -5
- package/front_end/panels/issues/components/HideIssuesMenu.ts +10 -10
- package/front_end/panels/layer_viewer/Layers3DView.ts +3 -9
- package/front_end/panels/lighthouse/LighthouseController.ts +4 -5
- package/front_end/panels/media/PlayerListView.ts +160 -97
- package/front_end/panels/media/PlayerMessagesView.ts +1 -0
- package/front_end/panels/media/TickingFlameChart.ts +1 -2
- package/front_end/panels/media/playerListView.css +58 -0
- package/front_end/panels/network/NetworkLogView.ts +2 -6
- package/front_end/panels/network/NetworkLogViewColumns.ts +1 -1
- package/front_end/panels/network/NetworkWaterfallColumn.ts +2 -4
- package/front_end/panels/network/components/RequestTrustTokensView.ts +40 -40
- package/front_end/panels/network/components/WebBundleInfoView.ts +9 -9
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +6 -12
- package/front_end/panels/profiler/HeapProfileView.ts +1 -1
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +0 -1
- package/front_end/panels/profiler/HeapSnapshotView.ts +1 -2
- package/front_end/panels/profiler/heapProfiler.css +1 -1
- package/front_end/panels/search/SearchConfig.ts +0 -6
- package/front_end/panels/security/SecurityModel.ts +2 -4
- package/front_end/panels/security/SecurityPanel.ts +2 -2
- package/front_end/panels/settings/KeybindsSettingsTab.ts +4 -0
- package/front_end/panels/settings/components/SyncSection.ts +14 -14
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +96 -96
- package/front_end/panels/settings/settingsScreen.css +8 -3
- package/front_end/panels/sources/BreakpointEditDialog.ts +4 -3
- package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +2 -2
- package/front_end/panels/sources/NavigatorView.ts +4 -10
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +2 -3
- package/front_end/panels/sources/SourceMapNamesResolver.ts +3 -3
- package/front_end/panels/sources/SourcesPanel.ts +1 -3
- package/front_end/panels/sources/SourcesView.ts +0 -3
- package/front_end/panels/sources/TabbedEditorContainer.ts +1 -4
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +2 -5
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +0 -1
- package/front_end/panels/timeline/TimelineFlameChartView.ts +0 -1
- package/front_end/panels/timeline/TimelineLoader.ts +0 -3
- package/front_end/panels/timeline/TimelinePanel.ts +2 -3
- package/front_end/panels/timeline/TimelineUIUtils.ts +1 -1
- package/front_end/panels/timeline/components/WebVitalsLane.ts +77 -76
- package/front_end/panels/timeline/components/WebVitalsTimeline.ts +133 -133
- package/front_end/panels/timeline/components/WebVitalsTooltip.ts +9 -9
- package/front_end/panels/webauthn/WebauthnPane.ts +203 -205
- package/front_end/third_party/codemirror.next/bundle.ts +3 -3
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/markdown.js +2 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +10 -1
- package/front_end/third_party/codemirror.next/codemirror.next.js +2 -1
- package/front_end/third_party/codemirror.next/package.json +3 -3
- package/front_end/third_party/puppeteer/package/README.md +11 -11
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api-docs-entry.d.ts +4 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.d.ts +4 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.d.ts +1 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.d.ts +1 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.d.ts +9 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js +21 -12
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Dialog.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EvalTypes.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ExecutionContext.d.ts +3 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FileChooser.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts +8 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts +50 -11
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js +70 -33
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.d.ts +12 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.js +25 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.d.ts +2 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts +39 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js +36 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.d.ts +3 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.js +2 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/LifecycleWatcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.d.ts +46 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.js +124 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkEventManager.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts +27 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js +144 -74
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Puppeteer.d.ts +5 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Target.d.ts +4 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WebWorker.d.ts +3 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.d.ts +4 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js +43 -17
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.js +101 -34
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/NodeWebSocketTransport.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PipeTransport.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.d.ts +5 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api-docs-entry.d.ts +4 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts +4 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js +2 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +3 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts +1 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts +1 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts +9 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js +24 -17
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EvalTypes.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts +3 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts +8 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js +7 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts +50 -11
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js +70 -34
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts +12 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.js +26 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts +2 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts +39 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js +38 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts +3 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.js +4 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.d.ts +46 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.js +120 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkEventManager.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts +27 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js +144 -75
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js +12 -14
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts +5 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.js +3 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts +4 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts +3 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js +3 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.js +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js +10 -12
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts +4 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js +43 -20
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js +104 -40
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.d.ts +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts +5 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/install.js +3 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node-puppeteer-core.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/web.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +173 -36
- package/front_end/third_party/puppeteer/package/package.json +3 -3
- package/front_end/ui/components/adorners/Adorner.ts +2 -2
- package/front_end/ui/components/buttons/Button.ts +9 -9
- package/front_end/ui/components/data_grid/DataGrid.ts +62 -62
- package/front_end/ui/components/data_grid/DataGridController.ts +22 -22
- package/front_end/ui/components/diff_view/DiffView.ts +6 -6
- package/front_end/ui/components/expandable_list/ExpandableList.ts +5 -5
- package/front_end/ui/components/icon_button/Icon.ts +4 -4
- package/front_end/ui/components/icon_button/IconButton.ts +4 -4
- package/front_end/ui/components/issue_counter/IssueCounter.ts +3 -3
- package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +11 -11
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +50 -50
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +6 -6
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +4 -4
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryNavigator.ts +12 -12
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts +11 -11
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +40 -39
- package/front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts +18 -18
- package/front_end/ui/components/linear_memory_inspector/ValueInterpreterSettings.ts +6 -6
- package/front_end/ui/components/linkifier/LinkifierImpl.ts +4 -4
- package/front_end/ui/components/markdown_view/MarkdownImage.ts +5 -5
- package/front_end/ui/components/markdown_view/MarkdownLink.ts +2 -2
- package/front_end/ui/components/markdown_view/MarkdownView.ts +4 -5
- package/front_end/ui/components/panel_feedback/FeedbackButton.ts +2 -2
- package/front_end/ui/components/panel_feedback/PanelFeedback.ts +2 -2
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +4 -4
- package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +22 -22
- package/front_end/ui/components/report_view/ReportView.ts +16 -16
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +14 -14
- package/front_end/ui/components/settings/SettingCheckbox.ts +5 -5
- package/front_end/ui/components/survey_link/SurveyLink.ts +8 -8
- package/front_end/ui/components/text_editor/TextEditor.ts +9 -9
- package/front_end/ui/components/text_editor/cursor_tooltip.ts +7 -1
- package/front_end/ui/components/text_prompt/TextPrompt.ts +18 -18
- package/front_end/ui/components/tree_outline/TreeOutline.ts +69 -70
- package/front_end/ui/legacy/ContextFlavorListener.ts +0 -4
- package/front_end/ui/legacy/ContextMenu.ts +2 -3
- package/front_end/ui/legacy/InspectorView.ts +1 -1
- package/front_end/ui/legacy/ReportView.ts +3 -4
- package/front_end/ui/legacy/SearchableView.ts +1 -2
- package/front_end/ui/legacy/SplitWidget.ts +2 -3
- package/front_end/ui/legacy/SuggestBox.ts +0 -3
- package/front_end/ui/legacy/TextPrompt.ts +1 -1
- package/front_end/ui/legacy/UIUtils.ts +1 -1
- package/front_end/ui/legacy/XLink.ts +1 -1
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +2 -2
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +9 -9
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +7 -7
- package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +1 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +1 -5
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +0 -1
- package/front_end/ui/legacy/components/utils/Linkifier.ts +2 -2
- package/front_end/ui/legacy/themeColors.css +2 -0
- package/front_end/ui/legacy/theme_support/theme_support_impl.ts +24 -1
- package/inspector_overlay/main.ts +16 -2
- package/package.json +1 -1
- package/scripts/eslint_rules/lib/use_private_class_members.js +41 -0
- package/scripts/eslint_rules/tests/use_private_class_members_test.js +62 -0
- package/scripts/migration/class-fields/migrate.js +2 -3
- package/scripts/migration/class-fields/migrate.sh +1 -3
- package/scripts/migration/class-fields/package.json +1 -1
|
@@ -123,51 +123,51 @@ export interface HeapSnapshotItemIndexProvider {
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
export class HeapSnapshotNodeIndexProvider implements HeapSnapshotItemIndexProvider {
|
|
126
|
-
|
|
126
|
+
#node: HeapSnapshotNode;
|
|
127
127
|
constructor(snapshot: HeapSnapshot) {
|
|
128
|
-
this
|
|
128
|
+
this.#node = snapshot.createNode();
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
itemForIndex(index: number): HeapSnapshotNode {
|
|
132
|
-
this
|
|
133
|
-
return this
|
|
132
|
+
this.#node.nodeIndex = index;
|
|
133
|
+
return this.#node;
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
export class HeapSnapshotEdgeIndexProvider implements HeapSnapshotItemIndexProvider {
|
|
138
|
-
|
|
138
|
+
#edge: JSHeapSnapshotEdge;
|
|
139
139
|
constructor(snapshot: HeapSnapshot) {
|
|
140
|
-
this
|
|
140
|
+
this.#edge = snapshot.createEdge(0);
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
itemForIndex(index: number): HeapSnapshotEdge {
|
|
144
|
-
this
|
|
145
|
-
return this
|
|
144
|
+
this.#edge.edgeIndex = index;
|
|
145
|
+
return this.#edge;
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
export class HeapSnapshotRetainerEdgeIndexProvider implements HeapSnapshotItemIndexProvider {
|
|
150
|
-
|
|
150
|
+
readonly #retainerEdge: JSHeapSnapshotRetainerEdge;
|
|
151
151
|
constructor(snapshot: HeapSnapshot) {
|
|
152
|
-
this
|
|
152
|
+
this.#retainerEdge = snapshot.createRetainingEdge(0);
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
itemForIndex(index: number): HeapSnapshotRetainerEdge {
|
|
156
|
-
this
|
|
157
|
-
return this
|
|
156
|
+
this.#retainerEdge.setRetainerIndex(index);
|
|
157
|
+
return this.#retainerEdge;
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
export class HeapSnapshotEdgeIterator implements HeapSnapshotItemIterator {
|
|
162
|
-
|
|
162
|
+
readonly #sourceNode: HeapSnapshotNode;
|
|
163
163
|
edge: JSHeapSnapshotEdge;
|
|
164
164
|
constructor(node: HeapSnapshotNode) {
|
|
165
|
-
this
|
|
165
|
+
this.#sourceNode = node;
|
|
166
166
|
this.edge = node.snapshot.createEdge(node.edgeIndexesStart());
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
hasNext(): boolean {
|
|
170
|
-
return this.edge.edgeIndex < this
|
|
170
|
+
return this.edge.edgeIndex < this.#sourceNode.edgeIndexesEnd();
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
item(): HeapSnapshotEdge {
|
|
@@ -184,11 +184,11 @@ export class HeapSnapshotEdgeIterator implements HeapSnapshotItemIterator {
|
|
|
184
184
|
|
|
185
185
|
export class HeapSnapshotRetainerEdge implements HeapSnapshotItem {
|
|
186
186
|
protected snapshot: HeapSnapshot;
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
187
|
+
#retainerIndexInternal!: number;
|
|
188
|
+
#globalEdgeIndex!: number;
|
|
189
|
+
#retainingNodeIndex?: number;
|
|
190
|
+
#edgeInstance?: JSHeapSnapshotEdge|null;
|
|
191
|
+
#nodeInstance?: HeapSnapshotNode|null;
|
|
192
192
|
constructor(snapshot: HeapSnapshot, retainerIndex: number) {
|
|
193
193
|
this.snapshot = snapshot;
|
|
194
194
|
this.setRetainerIndex(retainerIndex);
|
|
@@ -211,19 +211,19 @@ export class HeapSnapshotRetainerEdge implements HeapSnapshotItem {
|
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
nodeIndex(): number {
|
|
214
|
-
if (typeof this
|
|
214
|
+
if (typeof this.#retainingNodeIndex === 'undefined') {
|
|
215
215
|
throw new Error('retainingNodeIndex is undefined');
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
return this
|
|
218
|
+
return this.#retainingNodeIndex;
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
retainerIndex(): number {
|
|
222
|
-
return this
|
|
222
|
+
return this.#retainerIndexInternal;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
setRetainerIndex(retainerIndex: number): void {
|
|
226
|
-
if (retainerIndex === this
|
|
226
|
+
if (retainerIndex === this.#retainerIndexInternal) {
|
|
227
227
|
return;
|
|
228
228
|
}
|
|
229
229
|
|
|
@@ -231,11 +231,11 @@ export class HeapSnapshotRetainerEdge implements HeapSnapshotItem {
|
|
|
231
231
|
throw new Error('Snapshot does not contain retaining edges or retaining nodes');
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
this
|
|
235
|
-
this
|
|
236
|
-
this
|
|
237
|
-
this
|
|
238
|
-
this
|
|
234
|
+
this.#retainerIndexInternal = retainerIndex;
|
|
235
|
+
this.#globalEdgeIndex = this.snapshot.retainingEdges[retainerIndex];
|
|
236
|
+
this.#retainingNodeIndex = this.snapshot.retainingNodes[retainerIndex];
|
|
237
|
+
this.#edgeInstance = null;
|
|
238
|
+
this.#nodeInstance = null;
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
set edgeIndex(edgeIndex: number) {
|
|
@@ -243,17 +243,17 @@ export class HeapSnapshotRetainerEdge implements HeapSnapshotItem {
|
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
private nodeInternal(): HeapSnapshotNode {
|
|
246
|
-
if (!this
|
|
247
|
-
this
|
|
246
|
+
if (!this.#nodeInstance) {
|
|
247
|
+
this.#nodeInstance = this.snapshot.createNode(this.#retainingNodeIndex);
|
|
248
248
|
}
|
|
249
|
-
return this
|
|
249
|
+
return this.#nodeInstance;
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
protected edge(): JSHeapSnapshotEdge {
|
|
253
|
-
if (!this
|
|
254
|
-
this
|
|
253
|
+
if (!this.#edgeInstance) {
|
|
254
|
+
this.#edgeInstance = this.snapshot.createEdge(this.#globalEdgeIndex);
|
|
255
255
|
}
|
|
256
|
-
return this
|
|
256
|
+
return this.#edgeInstance;
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
toString(): string {
|
|
@@ -261,12 +261,12 @@ export class HeapSnapshotRetainerEdge implements HeapSnapshotItem {
|
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
itemIndex(): number {
|
|
264
|
-
return this
|
|
264
|
+
return this.#retainerIndexInternal;
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
serialize(): HeapSnapshotModel.HeapSnapshotModel.Edge {
|
|
268
268
|
return new HeapSnapshotModel.HeapSnapshotModel.Edge(
|
|
269
|
-
this.name(), this.node().serialize(), this.type(), this
|
|
269
|
+
this.name(), this.node().serialize(), this.type(), this.#globalEdgeIndex);
|
|
270
270
|
}
|
|
271
271
|
|
|
272
272
|
type(): string {
|
|
@@ -275,7 +275,7 @@ export class HeapSnapshotRetainerEdge implements HeapSnapshotItem {
|
|
|
275
275
|
}
|
|
276
276
|
|
|
277
277
|
export class HeapSnapshotRetainerEdgeIterator implements HeapSnapshotItemIterator {
|
|
278
|
-
|
|
278
|
+
readonly #retainersEnd: number;
|
|
279
279
|
retainer: JSHeapSnapshotRetainerEdge;
|
|
280
280
|
constructor(retainedNode: HeapSnapshotNode) {
|
|
281
281
|
const snapshot = retainedNode.snapshot;
|
|
@@ -284,12 +284,12 @@ export class HeapSnapshotRetainerEdgeIterator implements HeapSnapshotItemIterato
|
|
|
284
284
|
throw new Error('Snapshot does not contain firstRetainerIndex');
|
|
285
285
|
}
|
|
286
286
|
const retainerIndex = snapshot.firstRetainerIndex[retainedNodeOrdinal];
|
|
287
|
-
this
|
|
287
|
+
this.#retainersEnd = snapshot.firstRetainerIndex[retainedNodeOrdinal + 1];
|
|
288
288
|
this.retainer = snapshot.createRetainingEdge(retainerIndex);
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
hasNext(): boolean {
|
|
292
|
-
return this.retainer.retainerIndex() < this
|
|
292
|
+
return this.retainer.retainerIndex() < this.#retainersEnd;
|
|
293
293
|
}
|
|
294
294
|
|
|
295
295
|
item(): HeapSnapshotRetainerEdge {
|
|
@@ -432,14 +432,14 @@ export class HeapSnapshotNode implements HeapSnapshotItem {
|
|
|
432
432
|
|
|
433
433
|
export class HeapSnapshotNodeIterator implements HeapSnapshotItemIterator {
|
|
434
434
|
node: HeapSnapshotNode;
|
|
435
|
-
|
|
435
|
+
readonly #nodesLength: number;
|
|
436
436
|
constructor(node: HeapSnapshotNode) {
|
|
437
437
|
this.node = node;
|
|
438
|
-
this
|
|
438
|
+
this.#nodesLength = node.snapshot.nodes.length;
|
|
439
439
|
}
|
|
440
440
|
|
|
441
441
|
hasNext(): boolean {
|
|
442
|
-
return this.node.nodeIndex < this
|
|
442
|
+
return this.node.nodeIndex < this.#nodesLength;
|
|
443
443
|
}
|
|
444
444
|
|
|
445
445
|
item(): HeapSnapshotNode {
|
|
@@ -452,62 +452,62 @@ export class HeapSnapshotNodeIterator implements HeapSnapshotItemIterator {
|
|
|
452
452
|
}
|
|
453
453
|
|
|
454
454
|
export class HeapSnapshotIndexRangeIterator implements HeapSnapshotItemIterator {
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
455
|
+
readonly #itemProvider: HeapSnapshotItemIndexProvider;
|
|
456
|
+
readonly #indexes: number[]|Uint32Array;
|
|
457
|
+
#position: number;
|
|
458
458
|
constructor(itemProvider: HeapSnapshotItemIndexProvider, indexes: number[]|Uint32Array) {
|
|
459
|
-
this
|
|
460
|
-
this
|
|
461
|
-
this
|
|
459
|
+
this.#itemProvider = itemProvider;
|
|
460
|
+
this.#indexes = indexes;
|
|
461
|
+
this.#position = 0;
|
|
462
462
|
}
|
|
463
463
|
|
|
464
464
|
hasNext(): boolean {
|
|
465
|
-
return this
|
|
465
|
+
return this.#position < this.#indexes.length;
|
|
466
466
|
}
|
|
467
467
|
|
|
468
468
|
item(): HeapSnapshotItem {
|
|
469
|
-
const index = this
|
|
470
|
-
return this
|
|
469
|
+
const index = this.#indexes[this.#position];
|
|
470
|
+
return this.#itemProvider.itemForIndex(index);
|
|
471
471
|
}
|
|
472
472
|
|
|
473
473
|
next(): void {
|
|
474
|
-
++this
|
|
474
|
+
++this.#position;
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
477
|
|
|
478
478
|
export class HeapSnapshotFilteredIterator implements HeapSnapshotItemIterator {
|
|
479
|
-
|
|
480
|
-
|
|
479
|
+
#iterator: HeapSnapshotItemIterator;
|
|
480
|
+
#filter: ((arg0: HeapSnapshotItem) => boolean)|undefined;
|
|
481
481
|
constructor(iterator: HeapSnapshotItemIterator, filter?: ((arg0: HeapSnapshotItem) => boolean)) {
|
|
482
|
-
this
|
|
483
|
-
this
|
|
482
|
+
this.#iterator = iterator;
|
|
483
|
+
this.#filter = filter;
|
|
484
484
|
this.skipFilteredItems();
|
|
485
485
|
}
|
|
486
486
|
|
|
487
487
|
hasNext(): boolean {
|
|
488
|
-
return this
|
|
488
|
+
return this.#iterator.hasNext();
|
|
489
489
|
}
|
|
490
490
|
|
|
491
491
|
item(): HeapSnapshotItem {
|
|
492
|
-
return this
|
|
492
|
+
return this.#iterator.item();
|
|
493
493
|
}
|
|
494
494
|
|
|
495
495
|
next(): void {
|
|
496
|
-
this
|
|
496
|
+
this.#iterator.next();
|
|
497
497
|
this.skipFilteredItems();
|
|
498
498
|
}
|
|
499
499
|
|
|
500
500
|
private skipFilteredItems(): void {
|
|
501
|
-
while (this
|
|
502
|
-
this
|
|
501
|
+
while (this.#iterator.hasNext() && this.#filter && !this.#filter(this.#iterator.item())) {
|
|
502
|
+
this.#iterator.next();
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
506
|
|
|
507
507
|
export class HeapSnapshotProgress {
|
|
508
|
-
|
|
508
|
+
readonly #dispatcher: HeapSnapshotWorkerDispatcher|undefined;
|
|
509
509
|
constructor(dispatcher?: HeapSnapshotWorkerDispatcher) {
|
|
510
|
-
this
|
|
510
|
+
this.#dispatcher = dispatcher;
|
|
511
511
|
}
|
|
512
512
|
|
|
513
513
|
updateStatus(status: string): void {
|
|
@@ -521,34 +521,34 @@ export class HeapSnapshotProgress {
|
|
|
521
521
|
|
|
522
522
|
reportProblem(error: string): void {
|
|
523
523
|
// May be undefined in tests.
|
|
524
|
-
if (this
|
|
525
|
-
this
|
|
524
|
+
if (this.#dispatcher) {
|
|
525
|
+
this.#dispatcher.sendEvent(HeapSnapshotModel.HeapSnapshotModel.HeapSnapshotProgressEvent.BrokenSnapshot, error);
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
528
|
|
|
529
529
|
private sendUpdateEvent(serializedText: string): void {
|
|
530
530
|
// May be undefined in tests.
|
|
531
|
-
if (this
|
|
532
|
-
this
|
|
531
|
+
if (this.#dispatcher) {
|
|
532
|
+
this.#dispatcher.sendEvent(HeapSnapshotModel.HeapSnapshotModel.HeapSnapshotProgressEvent.Update, serializedText);
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
536
|
|
|
537
537
|
export class HeapSnapshotProblemReport {
|
|
538
|
-
|
|
538
|
+
readonly #errors: string[];
|
|
539
539
|
constructor(title: string) {
|
|
540
|
-
this
|
|
540
|
+
this.#errors = [title];
|
|
541
541
|
}
|
|
542
542
|
|
|
543
543
|
addError(error: string): void {
|
|
544
|
-
if (this
|
|
544
|
+
if (this.#errors.length > 100) {
|
|
545
545
|
return;
|
|
546
546
|
}
|
|
547
|
-
this
|
|
547
|
+
this.#errors.push(error);
|
|
548
548
|
}
|
|
549
549
|
|
|
550
550
|
toString(): string {
|
|
551
|
-
return this
|
|
551
|
+
return this.#errors.join('\n ');
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
554
|
export interface Profile {
|
|
@@ -578,36 +578,36 @@ const enum DOMLinkState {
|
|
|
578
578
|
export abstract class HeapSnapshot {
|
|
579
579
|
nodes: Uint32Array;
|
|
580
580
|
containmentEdges: Uint32Array;
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
581
|
+
readonly #metaNode: HeapSnapshotMetainfo;
|
|
582
|
+
readonly #rawSamples: number[];
|
|
583
|
+
#samples: HeapSnapshotModel.HeapSnapshotModel.Samples|null;
|
|
584
584
|
strings: string[];
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
585
|
+
readonly #locations: number[];
|
|
586
|
+
readonly #progress: HeapSnapshotProgress;
|
|
587
|
+
readonly #noDistance: number;
|
|
588
588
|
rootNodeIndexInternal: number;
|
|
589
|
-
|
|
589
|
+
#snapshotDiffs: {
|
|
590
590
|
[x: string]: {
|
|
591
591
|
[x: string]: HeapSnapshotModel.HeapSnapshotModel.Diff,
|
|
592
592
|
},
|
|
593
593
|
};
|
|
594
|
-
|
|
594
|
+
#aggregatesForDiffInternal!: {
|
|
595
595
|
[x: string]: HeapSnapshotModel.HeapSnapshotModel.AggregateForDiff,
|
|
596
596
|
};
|
|
597
|
-
|
|
597
|
+
#aggregates: {
|
|
598
598
|
[x: string]: {
|
|
599
599
|
[x: string]: AggregatedInfo,
|
|
600
600
|
},
|
|
601
601
|
};
|
|
602
|
-
|
|
602
|
+
#aggregatesSortedFlags: {
|
|
603
603
|
[x: string]: boolean,
|
|
604
604
|
};
|
|
605
|
-
|
|
605
|
+
#profile: Profile;
|
|
606
606
|
nodeTypeOffset!: number;
|
|
607
607
|
nodeNameOffset!: number;
|
|
608
608
|
nodeIdOffset!: number;
|
|
609
609
|
nodeSelfSizeOffset!: number;
|
|
610
|
-
|
|
610
|
+
#nodeEdgeCountOffset!: number;
|
|
611
611
|
nodeTraceNodeIdOffset!: number;
|
|
612
612
|
nodeFieldCount!: number;
|
|
613
613
|
nodeTypes!: string[];
|
|
@@ -630,25 +630,25 @@ export abstract class HeapSnapshot {
|
|
|
630
630
|
edgeShortcutType!: number;
|
|
631
631
|
edgeWeakType!: number;
|
|
632
632
|
edgeInvisibleType!: number;
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
633
|
+
#locationIndexOffset!: number;
|
|
634
|
+
#locationScriptIdOffset!: number;
|
|
635
|
+
#locationLineOffset!: number;
|
|
636
|
+
#locationColumnOffset!: number;
|
|
637
|
+
#locationFieldCount!: number;
|
|
638
638
|
nodeCount!: number;
|
|
639
|
-
|
|
639
|
+
#edgeCount!: number;
|
|
640
640
|
retainedSizes!: Float64Array;
|
|
641
641
|
firstEdgeIndexes!: Uint32Array;
|
|
642
642
|
retainingNodes!: Uint32Array;
|
|
643
643
|
retainingEdges!: Uint32Array;
|
|
644
644
|
firstRetainerIndex!: Uint32Array;
|
|
645
645
|
nodeDistances!: Int32Array;
|
|
646
|
-
|
|
647
|
-
|
|
646
|
+
firstDominatedNodeIndex!: Uint32Array;
|
|
647
|
+
dominatedNodes!: Uint32Array;
|
|
648
648
|
dominatorsTree!: Uint32Array;
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
649
|
+
#allocationProfile!: AllocationProfile;
|
|
650
|
+
#nodeDetachednessOffset!: number;
|
|
651
|
+
#locationMap!: Map<number, HeapSnapshotModel.HeapSnapshotModel.Location>;
|
|
652
652
|
lazyStringCache!: {
|
|
653
653
|
[x: string]: string,
|
|
654
654
|
};
|
|
@@ -656,37 +656,37 @@ export abstract class HeapSnapshot {
|
|
|
656
656
|
constructor(profile: Profile, progress: HeapSnapshotProgress) {
|
|
657
657
|
this.nodes = profile.nodes;
|
|
658
658
|
this.containmentEdges = profile.edges;
|
|
659
|
-
this
|
|
660
|
-
this
|
|
661
|
-
this
|
|
659
|
+
this.#metaNode = profile.snapshot.meta;
|
|
660
|
+
this.#rawSamples = profile.samples;
|
|
661
|
+
this.#samples = null;
|
|
662
662
|
this.strings = profile.strings;
|
|
663
|
-
this
|
|
664
|
-
this
|
|
663
|
+
this.#locations = profile.locations;
|
|
664
|
+
this.#progress = progress;
|
|
665
665
|
|
|
666
|
-
this
|
|
666
|
+
this.#noDistance = -5;
|
|
667
667
|
this.rootNodeIndexInternal = 0;
|
|
668
668
|
if (profile.snapshot.root_index) {
|
|
669
669
|
this.rootNodeIndexInternal = profile.snapshot.root_index;
|
|
670
670
|
}
|
|
671
671
|
|
|
672
|
-
this
|
|
672
|
+
this.#snapshotDiffs = {};
|
|
673
673
|
|
|
674
|
-
this
|
|
674
|
+
this.#aggregates = {};
|
|
675
675
|
|
|
676
|
-
this
|
|
677
|
-
this
|
|
676
|
+
this.#aggregatesSortedFlags = {};
|
|
677
|
+
this.#profile = profile;
|
|
678
678
|
}
|
|
679
679
|
|
|
680
680
|
initialize(): void {
|
|
681
|
-
const meta = this
|
|
681
|
+
const meta = this.#metaNode;
|
|
682
682
|
|
|
683
683
|
this.nodeTypeOffset = meta.node_fields.indexOf('type');
|
|
684
684
|
this.nodeNameOffset = meta.node_fields.indexOf('name');
|
|
685
685
|
this.nodeIdOffset = meta.node_fields.indexOf('id');
|
|
686
686
|
this.nodeSelfSizeOffset = meta.node_fields.indexOf('self_size');
|
|
687
|
-
this
|
|
687
|
+
this.#nodeEdgeCountOffset = meta.node_fields.indexOf('edge_count');
|
|
688
688
|
this.nodeTraceNodeIdOffset = meta.node_fields.indexOf('trace_node_id');
|
|
689
|
-
this
|
|
689
|
+
this.#nodeDetachednessOffset = meta.node_fields.indexOf('detachedness');
|
|
690
690
|
this.nodeFieldCount = meta.node_fields.length;
|
|
691
691
|
|
|
692
692
|
this.nodeTypes = meta.node_types[this.nodeTypeOffset];
|
|
@@ -715,53 +715,53 @@ export abstract class HeapSnapshot {
|
|
|
715
715
|
|
|
716
716
|
const locationFields = meta.location_fields || [];
|
|
717
717
|
|
|
718
|
-
this
|
|
719
|
-
this
|
|
720
|
-
this
|
|
721
|
-
this
|
|
722
|
-
this
|
|
718
|
+
this.#locationIndexOffset = locationFields.indexOf('object_index');
|
|
719
|
+
this.#locationScriptIdOffset = locationFields.indexOf('script_id');
|
|
720
|
+
this.#locationLineOffset = locationFields.indexOf('line');
|
|
721
|
+
this.#locationColumnOffset = locationFields.indexOf('column');
|
|
722
|
+
this.#locationFieldCount = locationFields.length;
|
|
723
723
|
|
|
724
724
|
this.nodeCount = this.nodes.length / this.nodeFieldCount;
|
|
725
|
-
this
|
|
725
|
+
this.#edgeCount = this.containmentEdges.length / this.edgeFieldsCount;
|
|
726
726
|
|
|
727
727
|
this.retainedSizes = new Float64Array(this.nodeCount);
|
|
728
728
|
this.firstEdgeIndexes = new Uint32Array(this.nodeCount + 1);
|
|
729
|
-
this.retainingNodes = new Uint32Array(this
|
|
730
|
-
this.retainingEdges = new Uint32Array(this
|
|
729
|
+
this.retainingNodes = new Uint32Array(this.#edgeCount);
|
|
730
|
+
this.retainingEdges = new Uint32Array(this.#edgeCount);
|
|
731
731
|
this.firstRetainerIndex = new Uint32Array(this.nodeCount + 1);
|
|
732
732
|
this.nodeDistances = new Int32Array(this.nodeCount);
|
|
733
733
|
this.firstDominatedNodeIndex = new Uint32Array(this.nodeCount + 1);
|
|
734
734
|
this.dominatedNodes = new Uint32Array(this.nodeCount - 1);
|
|
735
735
|
|
|
736
|
-
this
|
|
736
|
+
this.#progress.updateStatus('Building edge indexes…');
|
|
737
737
|
this.buildEdgeIndexes();
|
|
738
|
-
this
|
|
738
|
+
this.#progress.updateStatus('Building retainers…');
|
|
739
739
|
this.buildRetainers();
|
|
740
|
-
this
|
|
740
|
+
this.#progress.updateStatus('Propagating DOM state…');
|
|
741
741
|
this.propagateDOMState();
|
|
742
|
-
this
|
|
742
|
+
this.#progress.updateStatus('Calculating node flags…');
|
|
743
743
|
this.calculateFlags();
|
|
744
|
-
this
|
|
744
|
+
this.#progress.updateStatus('Calculating distances…');
|
|
745
745
|
this.calculateDistances();
|
|
746
|
-
this
|
|
746
|
+
this.#progress.updateStatus('Building postorder index…');
|
|
747
747
|
const result = this.buildPostOrderIndex();
|
|
748
748
|
// Actually it is array that maps node ordinal number to dominator node ordinal number.
|
|
749
|
-
this
|
|
749
|
+
this.#progress.updateStatus('Building dominator tree…');
|
|
750
750
|
this.dominatorsTree = this.buildDominatorTree(result.postOrderIndex2NodeOrdinal, result.nodeOrdinal2PostOrderIndex);
|
|
751
|
-
this
|
|
751
|
+
this.#progress.updateStatus('Calculating retained sizes…');
|
|
752
752
|
this.calculateRetainedSizes(result.postOrderIndex2NodeOrdinal);
|
|
753
|
-
this
|
|
753
|
+
this.#progress.updateStatus('Building dominated nodes…');
|
|
754
754
|
this.buildDominatedNodes();
|
|
755
|
-
this
|
|
755
|
+
this.#progress.updateStatus('Calculating statistics…');
|
|
756
756
|
this.calculateStatistics();
|
|
757
|
-
this
|
|
757
|
+
this.#progress.updateStatus('Calculating samples…');
|
|
758
758
|
this.buildSamples();
|
|
759
|
-
this
|
|
759
|
+
this.#progress.updateStatus('Building locations…');
|
|
760
760
|
this.buildLocationMap();
|
|
761
|
-
this
|
|
761
|
+
this.#progress.updateStatus('Finished processing.');
|
|
762
762
|
|
|
763
|
-
if (this
|
|
764
|
-
this
|
|
763
|
+
if (this.#profile.snapshot.trace_function_count) {
|
|
764
|
+
this.#progress.updateStatus('Building allocation statistics…');
|
|
765
765
|
const nodes = this.nodes;
|
|
766
766
|
const nodesLength = nodes.length;
|
|
767
767
|
const nodeFieldCount = this.nodeFieldCount;
|
|
@@ -782,8 +782,8 @@ export abstract class HeapSnapshot {
|
|
|
782
782
|
stats.size += node.selfSize();
|
|
783
783
|
stats.ids.push(node.id());
|
|
784
784
|
}
|
|
785
|
-
this
|
|
786
|
-
this
|
|
785
|
+
this.#allocationProfile = new AllocationProfile(this.#profile, liveObjects);
|
|
786
|
+
this.#progress.updateStatus('done');
|
|
787
787
|
}
|
|
788
788
|
}
|
|
789
789
|
|
|
@@ -793,7 +793,7 @@ export abstract class HeapSnapshot {
|
|
|
793
793
|
const firstEdgeIndexes = this.firstEdgeIndexes;
|
|
794
794
|
const nodeFieldCount = this.nodeFieldCount;
|
|
795
795
|
const edgeFieldsCount = this.edgeFieldsCount;
|
|
796
|
-
const nodeEdgeCountOffset = this
|
|
796
|
+
const nodeEdgeCountOffset = this.#nodeEdgeCountOffset;
|
|
797
797
|
firstEdgeIndexes[nodeCount] = this.containmentEdges.length;
|
|
798
798
|
for (let nodeOrdinal = 0, edgeIndex = 0; nodeOrdinal < nodeCount; ++nodeOrdinal) {
|
|
799
799
|
firstEdgeIndexes[nodeOrdinal] = edgeIndex;
|
|
@@ -965,11 +965,11 @@ export abstract class HeapSnapshot {
|
|
|
965
965
|
|
|
966
966
|
private createAllocationStackFilter(bottomUpAllocationNodeId: number):
|
|
967
967
|
((arg0: HeapSnapshotNode) => boolean)|undefined {
|
|
968
|
-
if (!this
|
|
968
|
+
if (!this.#allocationProfile) {
|
|
969
969
|
throw new Error('No Allocation Profile provided');
|
|
970
970
|
}
|
|
971
971
|
|
|
972
|
-
const traceIds = this
|
|
972
|
+
const traceIds = this.#allocationProfile.traceIds(bottomUpAllocationNodeId);
|
|
973
973
|
if (!traceIds.length) {
|
|
974
974
|
return undefined;
|
|
975
975
|
}
|
|
@@ -989,20 +989,20 @@ export abstract class HeapSnapshot {
|
|
|
989
989
|
const aggregates = this.buildAggregates(filter);
|
|
990
990
|
|
|
991
991
|
let aggregatesByClassName;
|
|
992
|
-
if (key && this
|
|
993
|
-
aggregatesByClassName = this
|
|
992
|
+
if (key && this.#aggregates[key]) {
|
|
993
|
+
aggregatesByClassName = this.#aggregates[key];
|
|
994
994
|
} else {
|
|
995
995
|
this.calculateClassesRetainedSize(aggregates.aggregatesByClassIndex, filter);
|
|
996
996
|
aggregatesByClassName = aggregates.aggregatesByClassName;
|
|
997
997
|
if (key) {
|
|
998
|
-
this
|
|
998
|
+
this.#aggregates[key] = aggregatesByClassName;
|
|
999
999
|
}
|
|
1000
1000
|
}
|
|
1001
1001
|
|
|
1002
|
-
if (sortedIndexes && (!key || !this
|
|
1002
|
+
if (sortedIndexes && (!key || !this.#aggregatesSortedFlags[key])) {
|
|
1003
1003
|
this.sortAggregateIndexes(aggregates.aggregatesByClassName);
|
|
1004
1004
|
if (key) {
|
|
1005
|
-
this
|
|
1005
|
+
this.#aggregatesSortedFlags[key] = sortedIndexes;
|
|
1006
1006
|
}
|
|
1007
1007
|
}
|
|
1008
1008
|
|
|
@@ -1012,11 +1012,11 @@ export abstract class HeapSnapshot {
|
|
|
1012
1012
|
}
|
|
1013
1013
|
|
|
1014
1014
|
allocationTracesTops(): HeapSnapshotModel.HeapSnapshotModel.SerializedAllocationNode[] {
|
|
1015
|
-
return this
|
|
1015
|
+
return this.#allocationProfile.serializeTraceTops();
|
|
1016
1016
|
}
|
|
1017
1017
|
|
|
1018
1018
|
allocationNodeCallers(nodeId: number): HeapSnapshotModel.HeapSnapshotModel.AllocationNodeCallers {
|
|
1019
|
-
return this
|
|
1019
|
+
return this.#allocationProfile.serializeCallers(nodeId);
|
|
1020
1020
|
}
|
|
1021
1021
|
|
|
1022
1022
|
allocationStack(nodeIndex: number): HeapSnapshotModel.HeapSnapshotModel.AllocationStackFrame[]|null {
|
|
@@ -1025,16 +1025,16 @@ export abstract class HeapSnapshot {
|
|
|
1025
1025
|
if (!allocationNodeId) {
|
|
1026
1026
|
return null;
|
|
1027
1027
|
}
|
|
1028
|
-
return this
|
|
1028
|
+
return this.#allocationProfile.serializeAllocationStack(allocationNodeId);
|
|
1029
1029
|
}
|
|
1030
1030
|
|
|
1031
1031
|
aggregatesForDiff(): {[x: string]: HeapSnapshotModel.HeapSnapshotModel.AggregateForDiff} {
|
|
1032
|
-
if (this
|
|
1033
|
-
return this
|
|
1032
|
+
if (this.#aggregatesForDiffInternal) {
|
|
1033
|
+
return this.#aggregatesForDiffInternal;
|
|
1034
1034
|
}
|
|
1035
1035
|
|
|
1036
1036
|
const aggregatesByClassName = this.getAggregatesByClassName(true, 'allObjects');
|
|
1037
|
-
this
|
|
1037
|
+
this.#aggregatesForDiffInternal = {};
|
|
1038
1038
|
|
|
1039
1039
|
const node = this.createNode();
|
|
1040
1040
|
for (const className in aggregatesByClassName) {
|
|
@@ -1048,9 +1048,9 @@ export abstract class HeapSnapshot {
|
|
|
1048
1048
|
selfSizes[i] = node.selfSize();
|
|
1049
1049
|
}
|
|
1050
1050
|
|
|
1051
|
-
this
|
|
1051
|
+
this.#aggregatesForDiffInternal[className] = {indexes: indexes, ids: ids, selfSizes: selfSizes};
|
|
1052
1052
|
}
|
|
1053
|
-
return this
|
|
1053
|
+
return this.#aggregatesForDiffInternal;
|
|
1054
1054
|
}
|
|
1055
1055
|
|
|
1056
1056
|
isUserRoot(_node: HeapSnapshotNode): boolean {
|
|
@@ -1060,7 +1060,7 @@ export abstract class HeapSnapshot {
|
|
|
1060
1060
|
calculateDistances(filter?: ((arg0: HeapSnapshotNode, arg1: HeapSnapshotEdge) => boolean)): void {
|
|
1061
1061
|
const nodeCount = this.nodeCount;
|
|
1062
1062
|
const distances = this.nodeDistances;
|
|
1063
|
-
const noDistance = this
|
|
1063
|
+
const noDistance = this.#noDistance;
|
|
1064
1064
|
for (let i = 0; i < nodeCount; ++i) {
|
|
1065
1065
|
distances[i] = noDistance;
|
|
1066
1066
|
}
|
|
@@ -1098,7 +1098,7 @@ export abstract class HeapSnapshot {
|
|
|
1098
1098
|
const edgeTypeOffset = this.edgeTypeOffset;
|
|
1099
1099
|
const nodeCount = this.nodeCount;
|
|
1100
1100
|
const edgeWeakType = this.edgeWeakType;
|
|
1101
|
-
const noDistance = this
|
|
1101
|
+
const noDistance = this.#noDistance;
|
|
1102
1102
|
|
|
1103
1103
|
let index = 0;
|
|
1104
1104
|
const edge = this.createEdge(0);
|
|
@@ -1652,7 +1652,7 @@ export abstract class HeapSnapshot {
|
|
|
1652
1652
|
* "Detached <Name>".
|
|
1653
1653
|
*/
|
|
1654
1654
|
private propagateDOMState(): void {
|
|
1655
|
-
if (this
|
|
1655
|
+
if (this.#nodeDetachednessOffset === -1) {
|
|
1656
1656
|
return;
|
|
1657
1657
|
}
|
|
1658
1658
|
|
|
@@ -1697,7 +1697,7 @@ export abstract class HeapSnapshot {
|
|
|
1697
1697
|
return;
|
|
1698
1698
|
}
|
|
1699
1699
|
|
|
1700
|
-
snapshot.nodes[nodeIndex + snapshot
|
|
1700
|
+
snapshot.nodes[nodeIndex + snapshot.#nodeDetachednessOffset] = newState;
|
|
1701
1701
|
|
|
1702
1702
|
if (newState === DOMLinkState.Attached) {
|
|
1703
1703
|
attached.push(nodeOrdinal);
|
|
@@ -1722,7 +1722,7 @@ export abstract class HeapSnapshot {
|
|
|
1722
1722
|
// through processing to have their name adjusted and them enqueued in
|
|
1723
1723
|
// the respective queues.
|
|
1724
1724
|
for (let nodeOrdinal = 0; nodeOrdinal < this.nodeCount; ++nodeOrdinal) {
|
|
1725
|
-
const state = this.nodes[nodeOrdinal * this.nodeFieldCount + this
|
|
1725
|
+
const state = this.nodes[nodeOrdinal * this.nodeFieldCount + this.#nodeDetachednessOffset];
|
|
1726
1726
|
// Bail out for objects that have no known state. For all other objects set that state.
|
|
1727
1727
|
if (state === DOMLinkState.Unknown) {
|
|
1728
1728
|
continue;
|
|
@@ -1737,7 +1737,7 @@ export abstract class HeapSnapshot {
|
|
|
1737
1737
|
// 3. If the parent is not attached, then the child inherits the parent's state.
|
|
1738
1738
|
while (detached.length !== 0) {
|
|
1739
1739
|
const nodeOrdinal = (detached.pop() as number);
|
|
1740
|
-
const nodeState = this.nodes[nodeOrdinal * this.nodeFieldCount + this
|
|
1740
|
+
const nodeState = this.nodes[nodeOrdinal * this.nodeFieldCount + this.#nodeDetachednessOffset];
|
|
1741
1741
|
// Ignore if the node has been found through propagating forward attached state.
|
|
1742
1742
|
if (nodeState === DOMLinkState.Attached) {
|
|
1743
1743
|
continue;
|
|
@@ -1749,7 +1749,7 @@ export abstract class HeapSnapshot {
|
|
|
1749
1749
|
}
|
|
1750
1750
|
|
|
1751
1751
|
private buildSamples(): void {
|
|
1752
|
-
const samples = this
|
|
1752
|
+
const samples = this.#rawSamples;
|
|
1753
1753
|
if (!samples || !samples.length) {
|
|
1754
1754
|
return;
|
|
1755
1755
|
}
|
|
@@ -1758,8 +1758,8 @@ export abstract class HeapSnapshot {
|
|
|
1758
1758
|
const timestamps = new Array(sampleCount);
|
|
1759
1759
|
const lastAssignedIds = new Array(sampleCount);
|
|
1760
1760
|
|
|
1761
|
-
const timestampOffset = this
|
|
1762
|
-
const lastAssignedIdOffset = this
|
|
1761
|
+
const timestampOffset = this.#metaNode.sample_fields.indexOf('timestamp_us');
|
|
1762
|
+
const lastAssignedIdOffset = this.#metaNode.sample_fields.indexOf('last_assigned_id');
|
|
1763
1763
|
for (let i = 0; i < sampleCount; i++) {
|
|
1764
1764
|
sizeForRange[i] = 0;
|
|
1765
1765
|
timestamps[i] = (samples[2 * i + timestampOffset]) / 1000;
|
|
@@ -1786,30 +1786,30 @@ export abstract class HeapSnapshot {
|
|
|
1786
1786
|
}
|
|
1787
1787
|
sizeForRange[rangeIndex] += node.selfSize();
|
|
1788
1788
|
}
|
|
1789
|
-
this
|
|
1789
|
+
this.#samples = new HeapSnapshotModel.HeapSnapshotModel.Samples(timestamps, lastAssignedIds, sizeForRange);
|
|
1790
1790
|
}
|
|
1791
1791
|
|
|
1792
1792
|
private buildLocationMap(): void {
|
|
1793
1793
|
const map = new Map<number, HeapSnapshotModel.HeapSnapshotModel.Location>();
|
|
1794
|
-
const locations = this
|
|
1794
|
+
const locations = this.#locations;
|
|
1795
1795
|
|
|
1796
|
-
for (let i = 0; i < locations.length; i += this
|
|
1797
|
-
const nodeIndex = locations[i + this
|
|
1798
|
-
const scriptId = locations[i + this
|
|
1799
|
-
const line = locations[i + this
|
|
1800
|
-
const col = locations[i + this
|
|
1796
|
+
for (let i = 0; i < locations.length; i += this.#locationFieldCount) {
|
|
1797
|
+
const nodeIndex = locations[i + this.#locationIndexOffset];
|
|
1798
|
+
const scriptId = locations[i + this.#locationScriptIdOffset];
|
|
1799
|
+
const line = locations[i + this.#locationLineOffset];
|
|
1800
|
+
const col = locations[i + this.#locationColumnOffset];
|
|
1801
1801
|
map.set(nodeIndex, new HeapSnapshotModel.HeapSnapshotModel.Location(scriptId, line, col));
|
|
1802
1802
|
}
|
|
1803
1803
|
|
|
1804
|
-
this
|
|
1804
|
+
this.#locationMap = map;
|
|
1805
1805
|
}
|
|
1806
1806
|
|
|
1807
1807
|
getLocation(nodeIndex: number): HeapSnapshotModel.HeapSnapshotModel.Location|null {
|
|
1808
|
-
return this
|
|
1808
|
+
return this.#locationMap.get(nodeIndex) || null;
|
|
1809
1809
|
}
|
|
1810
1810
|
|
|
1811
1811
|
getSamples(): HeapSnapshotModel.HeapSnapshotModel.Samples|null {
|
|
1812
|
-
return this
|
|
1812
|
+
return this.#samples;
|
|
1813
1813
|
}
|
|
1814
1814
|
|
|
1815
1815
|
calculateFlags(): void {
|
|
@@ -1830,7 +1830,7 @@ export abstract class HeapSnapshot {
|
|
|
1830
1830
|
{[x: string]: HeapSnapshotModel.HeapSnapshotModel.Diff} {
|
|
1831
1831
|
let snapshotDiff: {[x: string]: HeapSnapshotModel.HeapSnapshotModel.Diff}|{
|
|
1832
1832
|
[x: string]: HeapSnapshotModel.HeapSnapshotModel.Diff,
|
|
1833
|
-
} = this
|
|
1833
|
+
} = this.#snapshotDiffs[baseSnapshotId];
|
|
1834
1834
|
if (snapshotDiff) {
|
|
1835
1835
|
return snapshotDiff;
|
|
1836
1836
|
}
|
|
@@ -1857,7 +1857,7 @@ export abstract class HeapSnapshot {
|
|
|
1857
1857
|
}
|
|
1858
1858
|
}
|
|
1859
1859
|
|
|
1860
|
-
this
|
|
1860
|
+
this.#snapshotDiffs[baseSnapshotId] = snapshotDiff;
|
|
1861
1861
|
return snapshotDiff;
|
|
1862
1862
|
}
|
|
1863
1863
|
|
|
@@ -1973,7 +1973,7 @@ export abstract class HeapSnapshot {
|
|
|
1973
1973
|
}
|
|
1974
1974
|
|
|
1975
1975
|
createAddedNodesProvider(baseSnapshotId: string, className: string): HeapSnapshotNodesProvider {
|
|
1976
|
-
const snapshotDiff = this
|
|
1976
|
+
const snapshotDiff = this.#snapshotDiffs[baseSnapshotId];
|
|
1977
1977
|
const diffForClass = snapshotDiff[className];
|
|
1978
1978
|
return new HeapSnapshotNodesProvider(this, diffForClass.addedIndexes);
|
|
1979
1979
|
}
|
|
@@ -2043,20 +2043,20 @@ export class HeapSnapshotHeader {
|
|
|
2043
2043
|
|
|
2044
2044
|
export abstract class HeapSnapshotItemProvider {
|
|
2045
2045
|
protected readonly iterator: HeapSnapshotItemIterator;
|
|
2046
|
-
|
|
2047
|
-
|
|
2046
|
+
readonly #indexProvider: HeapSnapshotItemIndexProvider;
|
|
2047
|
+
readonly #isEmptyInternal: boolean;
|
|
2048
2048
|
protected iterationOrder: number[]|null;
|
|
2049
2049
|
protected currentComparator: HeapSnapshotModel.HeapSnapshotModel.ComparatorConfig|null;
|
|
2050
|
-
|
|
2051
|
-
|
|
2050
|
+
#sortedPrefixLength: number;
|
|
2051
|
+
#sortedSuffixLength: number;
|
|
2052
2052
|
constructor(iterator: HeapSnapshotItemIterator, indexProvider: HeapSnapshotItemIndexProvider) {
|
|
2053
2053
|
this.iterator = iterator;
|
|
2054
|
-
this
|
|
2055
|
-
this
|
|
2054
|
+
this.#indexProvider = indexProvider;
|
|
2055
|
+
this.#isEmptyInternal = !iterator.hasNext();
|
|
2056
2056
|
this.iterationOrder = null;
|
|
2057
2057
|
this.currentComparator = null;
|
|
2058
|
-
this
|
|
2059
|
-
this
|
|
2058
|
+
this.#sortedPrefixLength = 0;
|
|
2059
|
+
this.#sortedSuffixLength = 0;
|
|
2060
2060
|
}
|
|
2061
2061
|
|
|
2062
2062
|
protected createIterationOrder(): void {
|
|
@@ -2070,7 +2070,7 @@ export abstract class HeapSnapshotItemProvider {
|
|
|
2070
2070
|
}
|
|
2071
2071
|
|
|
2072
2072
|
isEmpty(): boolean {
|
|
2073
|
-
return this
|
|
2073
|
+
return this.#isEmptyInternal;
|
|
2074
2074
|
}
|
|
2075
2075
|
|
|
2076
2076
|
serializeItemsRange(begin: number, end: number): HeapSnapshotModel.HeapSnapshotModel.ItemsRange {
|
|
@@ -2086,17 +2086,17 @@ export abstract class HeapSnapshotItemProvider {
|
|
|
2086
2086
|
if (end > this.iterationOrder.length) {
|
|
2087
2087
|
end = this.iterationOrder.length;
|
|
2088
2088
|
}
|
|
2089
|
-
if (this
|
|
2089
|
+
if (this.#sortedPrefixLength < end && begin < this.iterationOrder.length - this.#sortedSuffixLength &&
|
|
2090
2090
|
this.currentComparator) {
|
|
2091
2091
|
const currentComparator = this.currentComparator;
|
|
2092
2092
|
this.sort(
|
|
2093
|
-
currentComparator, this
|
|
2093
|
+
currentComparator, this.#sortedPrefixLength, this.iterationOrder.length - 1 - this.#sortedSuffixLength, begin,
|
|
2094
2094
|
end - 1);
|
|
2095
|
-
if (begin <= this
|
|
2096
|
-
this
|
|
2095
|
+
if (begin <= this.#sortedPrefixLength) {
|
|
2096
|
+
this.#sortedPrefixLength = end;
|
|
2097
2097
|
}
|
|
2098
|
-
if (end >= this.iterationOrder.length - this
|
|
2099
|
-
this
|
|
2098
|
+
if (end >= this.iterationOrder.length - this.#sortedSuffixLength) {
|
|
2099
|
+
this.#sortedSuffixLength = this.iterationOrder.length - begin;
|
|
2100
2100
|
}
|
|
2101
2101
|
}
|
|
2102
2102
|
let position = begin;
|
|
@@ -2104,7 +2104,7 @@ export abstract class HeapSnapshotItemProvider {
|
|
|
2104
2104
|
const result = new Array(count);
|
|
2105
2105
|
for (let i = 0; i < count; ++i) {
|
|
2106
2106
|
const itemIndex = this.iterationOrder[position++];
|
|
2107
|
-
const item = this
|
|
2107
|
+
const item = this.#indexProvider.itemForIndex(itemIndex);
|
|
2108
2108
|
result[i] = item.serialize();
|
|
2109
2109
|
}
|
|
2110
2110
|
return new HeapSnapshotModel.HeapSnapshotModel.ItemsRange(begin, end, this.iterationOrder.length, result);
|
|
@@ -2112,8 +2112,8 @@ export abstract class HeapSnapshotItemProvider {
|
|
|
2112
2112
|
|
|
2113
2113
|
sortAndRewind(comparator: HeapSnapshotModel.HeapSnapshotModel.ComparatorConfig): void {
|
|
2114
2114
|
this.currentComparator = comparator;
|
|
2115
|
-
this
|
|
2116
|
-
this
|
|
2115
|
+
this.#sortedPrefixLength = 0;
|
|
2116
|
+
this.#sortedSuffixLength = 0;
|
|
2117
2117
|
}
|
|
2118
2118
|
|
|
2119
2119
|
abstract sort(
|
|
@@ -2280,9 +2280,7 @@ export class HeapSnapshotNodesProvider extends HeapSnapshotItemProvider {
|
|
|
2280
2280
|
const ascending1 = comparator.ascending1 ? 1 : -1;
|
|
2281
2281
|
const ascending2 = comparator.ascending2 ? 1 : -1;
|
|
2282
2282
|
|
|
2283
|
-
|
|
2284
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2285
|
-
function sortByNodeField(fieldAccessor: () => any, ascending: number): number {
|
|
2283
|
+
function sortByNodeField(fieldAccessor: () => void, ascending: number): number {
|
|
2286
2284
|
const valueA = fieldAccessor.call(nodeA);
|
|
2287
2285
|
const valueB = fieldAccessor.call(nodeB);
|
|
2288
2286
|
return valueA < valueB ? -ascending : (valueA > valueB ? ascending : 0);
|
|
@@ -2323,7 +2321,7 @@ export class JSHeapSnapshot extends HeapSnapshot {
|
|
|
2323
2321
|
};
|
|
2324
2322
|
lazyStringCache: {};
|
|
2325
2323
|
private flags!: Uint32Array;
|
|
2326
|
-
|
|
2324
|
+
#statistics?: HeapSnapshotModel.HeapSnapshotModel.Statistics;
|
|
2327
2325
|
constructor(profile: Profile, progress: HeapSnapshotProgress) {
|
|
2328
2326
|
super(profile, progress);
|
|
2329
2327
|
this.nodeFlags = {
|
|
@@ -2575,14 +2573,14 @@ export class JSHeapSnapshot extends HeapSnapshot {
|
|
|
2575
2573
|
sizeJSArrays += this.calculateArraySize(node);
|
|
2576
2574
|
}
|
|
2577
2575
|
}
|
|
2578
|
-
this
|
|
2579
|
-
this
|
|
2580
|
-
this
|
|
2581
|
-
this
|
|
2582
|
-
this
|
|
2583
|
-
this
|
|
2584
|
-
this
|
|
2585
|
-
this
|
|
2576
|
+
this.#statistics = new HeapSnapshotModel.HeapSnapshotModel.Statistics();
|
|
2577
|
+
this.#statistics.total = this.totalSize;
|
|
2578
|
+
this.#statistics.v8heap = this.totalSize - sizeNative;
|
|
2579
|
+
this.#statistics.native = sizeNative;
|
|
2580
|
+
this.#statistics.code = sizeCode;
|
|
2581
|
+
this.#statistics.jsArrays = sizeJSArrays;
|
|
2582
|
+
this.#statistics.strings = sizeStrings;
|
|
2583
|
+
this.#statistics.system = sizeSystem;
|
|
2586
2584
|
}
|
|
2587
2585
|
|
|
2588
2586
|
private calculateArraySize(node: HeapSnapshotNode): number {
|
|
@@ -2616,8 +2614,7 @@ export class JSHeapSnapshot extends HeapSnapshot {
|
|
|
2616
2614
|
}
|
|
2617
2615
|
|
|
2618
2616
|
getStatistics(): HeapSnapshotModel.HeapSnapshotModel.Statistics {
|
|
2619
|
-
return
|
|
2620
|
-
HeapSnapshotModel.HeapSnapshotModel.Statistics;
|
|
2617
|
+
return this.#statistics as HeapSnapshotModel.HeapSnapshotModel.Statistics;
|
|
2621
2618
|
}
|
|
2622
2619
|
}
|
|
2623
2620
|
|