chrome-devtools-frontend 1.0.1601661 → 1.0.1602543

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.
Files changed (119) hide show
  1. package/.agents/skills/version-control/SKILL.md +71 -0
  2. package/AUTHORS +1 -0
  3. package/front_end/core/common/Settings.ts +1 -871
  4. package/front_end/core/common/VersionController.ts +880 -0
  5. package/front_end/core/common/common.ts +2 -0
  6. package/front_end/core/host/InspectorFrontendHostStub.ts +0 -5
  7. package/front_end/core/platform/HostRuntime.ts +9 -3
  8. package/front_end/core/protocol_client/InspectorBackend.ts +8 -0
  9. package/front_end/core/root/Runtime.ts +5 -8
  10. package/front_end/core/sdk/DOMModel.ts +5 -4
  11. package/front_end/core/sdk/Target.ts +5 -0
  12. package/front_end/core/sdk/WebMCPModel.ts +98 -0
  13. package/front_end/core/sdk/sdk.ts +2 -0
  14. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +13 -19
  15. package/front_end/entrypoints/inspector_main/InspectorMain.ts +1 -1
  16. package/front_end/entrypoints/main/GlobalAiButton.ts +1 -1
  17. package/front_end/generated/InspectorBackendCommands.ts +6 -5
  18. package/front_end/generated/protocol.ts +36 -3
  19. package/front_end/models/ai_assistance/AiConversation.ts +3 -3
  20. package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +217 -9
  21. package/front_end/models/ai_assistance/agents/AiAgent.ts +14 -1
  22. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +19 -4
  23. package/front_end/models/ai_assistance/agents/NetworkAgent.ts +7 -1
  24. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +14 -2
  25. package/front_end/models/ai_assistance/agents/StylingAgent.ts +0 -23
  26. package/front_end/models/heap_snapshot_model/HeapSnapshotModel.ts +7 -7
  27. package/front_end/models/javascript_metadata/NativeFunctions.js +4 -0
  28. package/front_end/models/lighthouse/RunTypes.ts +3 -1
  29. package/front_end/models/live-metrics/LiveMetrics.ts +51 -31
  30. package/front_end/panels/accessibility/ARIAAttributesView.ts +2 -2
  31. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +9 -2
  32. package/front_end/panels/ai_assistance/components/ChatInput.ts +3 -2
  33. package/front_end/panels/ai_assistance/components/ChatMessage.ts +84 -27
  34. package/front_end/panels/ai_assistance/components/chatMessage.css +31 -2
  35. package/front_end/panels/application/AppManifestView.ts +2 -2
  36. package/front_end/panels/application/BackgroundServiceView.ts +9 -9
  37. package/front_end/panels/application/FrameDetailsView.ts +4 -13
  38. package/front_end/panels/application/IndexedDBViews.ts +1 -1
  39. package/front_end/panels/application/KeyValueStorageItemsView.ts +4 -4
  40. package/front_end/panels/application/ServiceWorkerCacheViews.ts +3 -3
  41. package/front_end/panels/application/components/PermissionsPolicySection.ts +1 -1
  42. package/front_end/panels/application/components/permissionsPolicySection.css +54 -52
  43. package/front_end/panels/application/frameDetailsReportView.css +13 -1
  44. package/front_end/panels/common/AiCodeCompletionSummaryToolbar.ts +2 -1
  45. package/front_end/panels/console_counters/WarningErrorCounter.ts +7 -14
  46. package/front_end/panels/elements/CSSValueTraceView.ts +9 -1
  47. package/front_end/panels/elements/NodeStackTraceWidget.ts +2 -1
  48. package/front_end/panels/elements/PropertiesWidget.ts +14 -13
  49. package/front_end/panels/elements/PropertyRenderer.ts +10 -9
  50. package/front_end/panels/elements/StandaloneStylesContainer.ts +15 -2
  51. package/front_end/panels/elements/StylePropertyTreeElement.ts +22 -1
  52. package/front_end/panels/elements/StylesSidebarPane.ts +34 -25
  53. package/front_end/panels/elements/stylePropertiesTreeOutline.css +5 -0
  54. package/front_end/panels/issues/AffectedSelectivePermissionsInterventionView.ts +2 -2
  55. package/front_end/panels/lighthouse/LighthouseController.ts +4 -1
  56. package/front_end/panels/media/EventDisplayTable.ts +3 -2
  57. package/front_end/panels/network/EventSourceMessagesView.ts +2 -2
  58. package/front_end/panels/network/RequestPayloadView.ts +2 -2
  59. package/front_end/panels/network/ResourceChunkView.ts +1 -1
  60. package/front_end/panels/profiler/HeapDetachedElementsView.ts +9 -4
  61. package/front_end/panels/profiler/HeapProfileView.ts +8 -4
  62. package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +40 -33
  63. package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +1 -1
  64. package/front_end/panels/profiler/HeapSnapshotProxy.ts +1 -1
  65. package/front_end/panels/profiler/HeapSnapshotView.ts +12 -18
  66. package/front_end/panels/profiler/LiveHeapProfileView.ts +3 -4
  67. package/front_end/panels/profiler/ProfileHeader.ts +5 -11
  68. package/front_end/panels/profiler/ProfileView.ts +1 -1
  69. package/front_end/panels/recorder/RecorderController.ts +4 -3
  70. package/front_end/panels/recorder/components/CreateRecordingView.ts +2 -1
  71. package/front_end/panels/recorder/components/RecordingView.ts +2 -2
  72. package/front_end/panels/recorder/models/RecordingPlayer.ts +3 -0
  73. package/front_end/panels/security/SecurityPanel.ts +3 -3
  74. package/front_end/panels/sensors/SensorsView.ts +149 -125
  75. package/front_end/panels/timeline/EventsTimelineTreeView.ts +2 -2
  76. package/front_end/panels/timeline/TimelineDetailsView.ts +6 -37
  77. package/front_end/panels/timeline/TimelineTreeView.ts +19 -17
  78. package/front_end/panels/timeline/TimelineUIUtils.ts +0 -118
  79. package/front_end/panels/timeline/components/IgnoreListSetting.ts +1 -1
  80. package/front_end/panels/timeline/components/SidebarInsightsTab.ts +2 -2
  81. package/front_end/panels/timeline/components/TimelineRangeSummaryView.ts +162 -9
  82. package/front_end/panels/timeline/components/timelineRangeSummaryView.css +22 -8
  83. package/front_end/panels/webauthn/WebauthnPane.ts +52 -0
  84. package/front_end/panels/whats_new/ReleaseNoteText.ts +10 -10
  85. package/front_end/panels/whats_new/resources/WNDT.md +6 -6
  86. package/front_end/third_party/chromium/README.chromium +1 -1
  87. package/front_end/third_party/puppeteer/README.chromium +2 -2
  88. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
  89. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +4 -0
  90. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
  91. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +2 -2
  92. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +2 -2
  93. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
  94. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
  95. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
  96. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +3 -3
  97. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
  98. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +4 -0
  99. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
  100. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +2 -2
  101. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +2 -2
  102. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
  103. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
  104. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
  105. package/front_end/third_party/puppeteer/package/package.json +1 -1
  106. package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +8 -0
  107. package/front_end/third_party/puppeteer/package/src/revisions.ts +2 -2
  108. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  109. package/front_end/ui/legacy/Toolbar.ts +25 -3
  110. package/front_end/ui/legacy/Treeoutline.ts +7 -3
  111. package/front_end/ui/legacy/UIUtils.ts +13 -11
  112. package/front_end/ui/legacy/Widget.ts +40 -40
  113. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
  114. package/front_end/ui/legacy/components/data_grid/SortableDataGrid.ts +2 -2
  115. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +39 -23
  116. package/front_end/ui/legacy/components/perf_ui/GCActionDelegate.ts +20 -4
  117. package/front_end/ui/legacy/treeoutline.css +4 -0
  118. package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
  119. package/package.json +1 -1
@@ -457,11 +457,15 @@ export class SamplingHeapProfileHeader extends WritableProfileHeader {
457
457
  nodes: never[],
458
458
  };
459
459
  constructor(
460
- heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel|null, type: SamplingHeapProfileTypeBase,
461
- title?: string) {
460
+ heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel|null,
461
+ type: SamplingHeapProfileTypeBase,
462
+ title?: string,
463
+ ) {
462
464
  super(
463
- heapProfilerModel?.debuggerModel() ?? null, type,
464
- title || i18nString(UIStrings.profileD, {PH1: type.nextProfileUid()}));
465
+ heapProfilerModel?.debuggerModel() ?? null,
466
+ type,
467
+ title || i18nString(UIStrings.profileD, {PH1: type.nextProfileUid()}),
468
+ );
465
469
  this.heapProfilerModelInternal = heapProfilerModel;
466
470
  this.protocolProfileInternal = {
467
471
  head: {
@@ -622,28 +622,27 @@ export class HeapSnapshotContainmentDataGrid extends HeapSnapshotSortableDataGri
622
622
  constructor(
623
623
  heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel|null, dataDisplayDelegate: DataDisplayDelegate,
624
624
  displayName: string, columns?: DataGrid.DataGrid.ColumnDescriptor[]) {
625
- columns =
626
- columns || ([
627
- {id: 'object', title: i18nString(UIStrings.object), disclosure: true, sortable: true},
628
- {id: 'distance', title: i18nString(UIStrings.distance), width: '70px', sortable: true, fixedWidth: true},
629
- {
630
- id: 'shallowSize',
631
- title: i18nString(UIStrings.shallowSize),
632
- width: '110px',
633
- sortable: true,
634
- fixedWidth: true,
635
- },
636
- {
637
- id: 'retainedSize',
638
- title: i18nString(UIStrings.retainedSize),
639
- width: '110px',
640
- sortable: true,
641
- fixedWidth: true,
642
- sort: DataGrid.DataGrid.Order.Descending,
643
- },
644
- ] as DataGrid.DataGrid.ColumnDescriptor[]);
645
- const dataGridParameters = ({displayName, columns} as DataGrid.DataGrid.Parameters);
646
- super(heapProfilerModel, dataDisplayDelegate, dataGridParameters);
625
+ const defaultColumns: DataGrid.DataGrid.ColumnDescriptor[] = [
626
+ {id: 'object', title: i18nString(UIStrings.object), disclosure: true, sortable: true},
627
+ {id: 'distance', title: i18nString(UIStrings.distance), width: '70px', sortable: true, fixedWidth: true},
628
+ {
629
+ id: 'shallowSize',
630
+ title: i18nString(UIStrings.shallowSize),
631
+ width: '110px',
632
+ sortable: true,
633
+ fixedWidth: true,
634
+ },
635
+ {
636
+ id: 'retainedSize',
637
+ title: i18nString(UIStrings.retainedSize),
638
+ width: '110px',
639
+ sortable: true,
640
+ fixedWidth: true,
641
+ sort: DataGrid.DataGrid.Order.Descending,
642
+ },
643
+ ];
644
+ columns = columns || defaultColumns;
645
+ super(heapProfilerModel, dataDisplayDelegate, {displayName, columns});
647
646
  }
648
647
 
649
648
  override async setDataSource(snapshot: HeapSnapshotProxy, nodeIndex: number, nodeId?: number): Promise<void> {
@@ -671,7 +670,7 @@ export class HeapSnapshotRetainmentDataGrid extends HeapSnapshotContainmentDataG
671
670
  resetRetainersButton: UI.Toolbar.ToolbarButton|undefined;
672
671
  constructor(
673
672
  heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel|null, dataDisplayDelegate: DataDisplayDelegate) {
674
- const columns = ([
673
+ const columns: DataGrid.DataGrid.ColumnDescriptor[] = [
675
674
  {id: 'object', title: i18nString(UIStrings.object), disclosure: true, sortable: true},
676
675
  {
677
676
  id: 'distance',
@@ -683,7 +682,7 @@ export class HeapSnapshotRetainmentDataGrid extends HeapSnapshotContainmentDataG
683
682
  },
684
683
  {id: 'shallowSize', title: i18nString(UIStrings.shallowSize), width: '110px', sortable: true, fixedWidth: true},
685
684
  {id: 'retainedSize', title: i18nString(UIStrings.retainedSize), width: '110px', sortable: true, fixedWidth: true},
686
- ] as DataGrid.DataGrid.ColumnDescriptor[]);
685
+ ];
687
686
  super(heapProfilerModel, dataDisplayDelegate, i18nString(UIStrings.heapSnapshotRetainment), columns);
688
687
  }
689
688
 
@@ -751,11 +750,19 @@ export class HeapSnapshotConstructorsDataGrid extends HeapSnapshotViewportDataGr
751
750
  filterInProgress?: HeapSnapshotModel.HeapSnapshotModel.NodeFilter|null;
752
751
 
753
752
  constructor(
754
- heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel|null, dataDisplayDelegate: DataDisplayDelegate) {
755
- const columns = ([
753
+ heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel|null,
754
+ dataDisplayDelegate: DataDisplayDelegate,
755
+ ) {
756
+ const columns: DataGrid.DataGrid.ColumnDescriptor[] = [
756
757
  {id: 'object', title: i18nString(UIStrings.constructorString), disclosure: true, sortable: true},
757
758
  {id: 'distance', title: i18nString(UIStrings.distance), width: '70px', sortable: true, fixedWidth: true},
758
- {id: 'shallowSize', title: i18nString(UIStrings.shallowSize), width: '110px', sortable: true, fixedWidth: true},
759
+ {
760
+ id: 'shallowSize',
761
+ title: i18nString(UIStrings.shallowSize),
762
+ width: '110px',
763
+ sortable: true,
764
+ fixedWidth: true,
765
+ },
759
766
  {
760
767
  id: 'retainedSize',
761
768
  title: i18nString(UIStrings.retainedSize),
@@ -764,7 +771,7 @@ export class HeapSnapshotConstructorsDataGrid extends HeapSnapshotViewportDataGr
764
771
  sortable: true,
765
772
  fixedWidth: true,
766
773
  },
767
- ] as DataGrid.DataGrid.ColumnDescriptor[]);
774
+ ];
768
775
  super(
769
776
  heapProfilerModel, dataDisplayDelegate,
770
777
  ({displayName: i18nString(UIStrings.heapSnapshotConstructors).toString(), columns} as
@@ -845,7 +852,7 @@ export class HeapSnapshotConstructorsDataGrid extends HeapSnapshotViewportDataGr
845
852
 
846
853
  aggregatesReceived(
847
854
  nodeFilter: HeapSnapshotModel.HeapSnapshotModel.NodeFilter,
848
- aggregates: Record<string, HeapSnapshotModel.HeapSnapshotModel.Aggregate>,
855
+ aggregates: Record<string, HeapSnapshotModel.HeapSnapshotModel.AggregatedInfo>,
849
856
  ): void {
850
857
  this.filterInProgress = null;
851
858
  if (this.nextRequestedFilter && this.snapshot) {
@@ -904,7 +911,7 @@ export class HeapSnapshotDiffDataGrid extends HeapSnapshotViewportDataGrid {
904
911
 
905
912
  constructor(
906
913
  heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel|null, dataDisplayDelegate: DataDisplayDelegate) {
907
- const columns = ([
914
+ const columns: DataGrid.DataGrid.ColumnDescriptor[] = [
908
915
  {id: 'object', title: i18nString(UIStrings.constructorString), disclosure: true, sortable: true},
909
916
  {id: 'addedCount', title: i18nString(UIStrings.New), width: '75px', sortable: true, fixedWidth: true},
910
917
  {id: 'removedCount', title: i18nString(UIStrings.Deleted), width: '75px', sortable: true, fixedWidth: true},
@@ -919,7 +926,7 @@ export class HeapSnapshotDiffDataGrid extends HeapSnapshotViewportDataGrid {
919
926
  },
920
927
  {id: 'removedSize', title: i18nString(UIStrings.freedSize), width: '75px', sortable: true, fixedWidth: true},
921
928
  {id: 'sizeDelta', title: i18nString(UIStrings.sizeDelta), width: '75px', sortable: true, fixedWidth: true},
922
- ] as DataGrid.DataGrid.ColumnDescriptor[]);
929
+ ];
923
930
  super(
924
931
  heapProfilerModel, dataDisplayDelegate,
925
932
  ({displayName: i18nString(UIStrings.heapSnapshotDiff).toString(), columns} as DataGrid.DataGrid.Parameters));
@@ -991,7 +998,7 @@ export class AllocationDataGrid extends HeapSnapshotViewportDataGrid {
991
998
 
992
999
  constructor(
993
1000
  heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel|null, dataDisplayDelegate: DataDisplayDelegate) {
994
- const columns = ([
1001
+ const columns: DataGrid.DataGrid.ColumnDescriptor[] = [
995
1002
  {id: 'liveCount', title: i18nString(UIStrings.liveCount), width: '75px', sortable: true, fixedWidth: true},
996
1003
  {id: 'count', title: i18nString(UIStrings.count), width: '65px', sortable: true, fixedWidth: true},
997
1004
  {id: 'liveSize', title: i18nString(UIStrings.liveSize), width: '75px', sortable: true, fixedWidth: true},
@@ -1004,7 +1011,7 @@ export class AllocationDataGrid extends HeapSnapshotViewportDataGrid {
1004
1011
  sort: DataGrid.DataGrid.Order.Descending,
1005
1012
  },
1006
1013
  {id: 'name', title: i18nString(UIStrings.function), disclosure: true, sortable: true},
1007
- ] as DataGrid.DataGrid.ColumnDescriptor[]);
1014
+ ];
1008
1015
  super(
1009
1016
  heapProfilerModel, dataDisplayDelegate,
1010
1017
  ({displayName: i18nString(UIStrings.allocation).toString(), columns} as DataGrid.DataGrid.Parameters));
@@ -1120,7 +1120,7 @@ export class HeapSnapshotConstructorNode extends HeapSnapshotGridNode {
1120
1120
 
1121
1121
  constructor(
1122
1122
  dataGrid: HeapSnapshotConstructorsDataGrid, classKey: string,
1123
- aggregate: HeapSnapshotModel.HeapSnapshotModel.Aggregate,
1123
+ aggregate: HeapSnapshotModel.HeapSnapshotModel.AggregatedInfo,
1124
1124
  nodeFilter: HeapSnapshotModel.HeapSnapshotModel.NodeFilter) {
1125
1125
  super(dataGrid, aggregate.count > 0);
1126
1126
  this.nameInternal = aggregate.name;
@@ -290,7 +290,7 @@ export class HeapSnapshotProxy extends HeapSnapshotProxyObject {
290
290
  }
291
291
 
292
292
  aggregatesWithFilter(filter: HeapSnapshotModel.HeapSnapshotModel.NodeFilter):
293
- Promise<Record<string, HeapSnapshotModel.HeapSnapshotModel.Aggregate>> {
293
+ Promise<Record<string, HeapSnapshotModel.HeapSnapshotModel.AggregatedInfo>> {
294
294
  return this.callMethodPromise('aggregatesWithFilter', filter);
295
295
  }
296
296
 
@@ -964,8 +964,6 @@ export class HeapSnapshotView extends UI.View.SimpleView implements DataDisplayD
964
964
  }
965
965
  let objectPopoverHelper: ObjectUI.ObjectPopoverHelper.ObjectPopoverHelper|null;
966
966
  return {
967
- // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)
968
- // @ts-expect-error
969
967
  box: span.boxInWindow(),
970
968
  show: async (popover: UI.GlassPane.GlassPane) => {
971
969
  if (!heapProfilerModel) {
@@ -1364,7 +1362,7 @@ export class HeapSnapshotProfileType extends
1364
1362
  return;
1365
1363
  }
1366
1364
 
1367
- let profile: HeapProfileHeader = new HeapProfileHeader(heapProfilerModel, this);
1365
+ let profile = new HeapProfileHeader(heapProfilerModel, this);
1368
1366
  this.setProfileBeingRecorded(profile);
1369
1367
  this.addProfile(profile);
1370
1368
  profile.updateStatus(i18nString(UIStrings.snapshotting));
@@ -1649,33 +1647,29 @@ export interface TrackingHeapSnapshotProfileTypeEventTypes {
1649
1647
 
1650
1648
  export class HeapProfileHeader extends ProfileHeader {
1651
1649
  readonly heapProfilerModelInternal: SDK.HeapProfilerModel.HeapProfilerModel|null;
1652
- maxJSObjectId: number;
1653
- workerProxy: HeapSnapshotWorkerProxy|null;
1654
- receiver: Common.StringOutputStream.OutputStream|null;
1655
- snapshotProxy: HeapSnapshotProxy|null;
1650
+ maxJSObjectId = -1;
1651
+ workerProxy: HeapSnapshotWorkerProxy|null = null;
1652
+ receiver: Common.StringOutputStream.OutputStream|null = null;
1653
+ snapshotProxy: HeapSnapshotProxy|null = null;
1656
1654
  readonly loadPromise: Promise<HeapSnapshotProxy>;
1657
1655
  fulfillLoad: (value: HeapSnapshotProxy|PromiseLike<HeapSnapshotProxy>) => void;
1658
- totalNumberOfChunks: number;
1659
- bufferedWriter: Bindings.TempFile.TempFile|null;
1660
- onTempFileReady: (() => void)|null;
1656
+ totalNumberOfChunks = 0;
1657
+ bufferedWriter: Bindings.TempFile.TempFile|null = null;
1658
+ onTempFileReady: (() => void)|null = null;
1661
1659
  failedToCreateTempFile?: boolean;
1662
1660
  wasDisposed?: boolean;
1663
1661
  fileName?: Platform.DevToolsPath.RawPathString;
1664
1662
 
1665
1663
  constructor(
1666
- heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel|null, type: HeapSnapshotProfileType, title?: string) {
1664
+ heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel|null,
1665
+ type: HeapSnapshotProfileType,
1666
+ title?: string,
1667
+ ) {
1667
1668
  super(type, title || i18nString(UIStrings.snapshotD, {PH1: type.nextProfileUid()}));
1668
1669
  this.heapProfilerModelInternal = heapProfilerModel;
1669
- this.maxJSObjectId = -1;
1670
- this.workerProxy = null;
1671
- this.receiver = null;
1672
- this.snapshotProxy = null;
1673
1670
  const {promise, resolve} = Promise.withResolvers<HeapSnapshotProxy>();
1674
1671
  this.loadPromise = promise;
1675
1672
  this.fulfillLoad = resolve;
1676
- this.totalNumberOfChunks = 0;
1677
- this.bufferedWriter = null;
1678
- this.onTempFileReady = null;
1679
1673
  }
1680
1674
 
1681
1675
  heapProfilerModel(): SDK.HeapProfilerModel.HeapProfilerModel|null {
@@ -103,15 +103,14 @@ export class LiveHeapProfileView extends UI.Widget.VBox {
103
103
  }
104
104
 
105
105
  createDataGrid(): DataGrid.SortableDataGrid.SortableDataGrid<GridNode> {
106
- const defaultColumnConfig: DataGrid.DataGrid.ColumnDescriptor = {
107
- id: '',
106
+ const defaultColumnConfig = {
108
107
  title: Common.UIString.LocalizedEmptyString,
109
108
  fixedWidth: true,
110
109
  sortable: true,
111
110
  align: DataGrid.DataGrid.Align.RIGHT,
112
111
  sort: DataGrid.DataGrid.Order.Descending,
113
112
  };
114
- const columns = [
113
+ const columns: Array<{tooltip: Common.UIString.LocalizedString}&DataGrid.DataGrid.ColumnDescriptor> = [
115
114
  {
116
115
  ...defaultColumnConfig,
117
116
  id: 'size',
@@ -140,7 +139,7 @@ export class LiveHeapProfileView extends UI.Widget.VBox {
140
139
  sortable: true,
141
140
  tooltip: i18nString(UIStrings.urlOfTheScriptSource),
142
141
  },
143
- ] as Array<{tooltip: Common.UIString.LocalizedString}&DataGrid.DataGrid.ColumnDescriptor>;
142
+ ];
144
143
  const dataGrid = new DataGrid.SortableDataGrid.SortableDataGrid({
145
144
  displayName: i18nString(UIStrings.heapProfile),
146
145
  columns,
@@ -11,17 +11,14 @@ export class ProfileHeader extends Common.ObjectWrapper.ObjectWrapper<EventTypes
11
11
  readonly #profileType: ProfileType;
12
12
  title: string;
13
13
  uid: number;
14
- #fromFile: boolean;
15
- tempFile: Bindings.TempFile.TempFile|null;
14
+ #fromFile = false;
15
+ tempFile: Bindings.TempFile.TempFile|null = null;
16
16
 
17
17
  constructor(profileType: ProfileType, title: string) {
18
18
  super();
19
19
  this.#profileType = profileType;
20
20
  this.title = title;
21
21
  this.uid = profileType.incrementProfileUid();
22
- this.#fromFile = false;
23
-
24
- this.tempFile = null;
25
22
  }
26
23
 
27
24
  setTitle(title: string): void {
@@ -103,17 +100,14 @@ export interface EventTypes {
103
100
  export class ProfileType extends Common.ObjectWrapper.ObjectWrapper<ProfileEventTypes> {
104
101
  readonly #id: string;
105
102
  readonly #name: string;
106
- profiles: ProfileHeader[];
107
- #profileBeingRecorded: ProfileHeader|null;
108
- #nextProfileUid: number;
103
+ profiles: ProfileHeader[] = [];
104
+ #profileBeingRecorded: ProfileHeader|null = null;
105
+ #nextProfileUid = 1;
109
106
 
110
107
  constructor(id: string, name: string) {
111
108
  super();
112
109
  this.#id = id;
113
110
  this.#name = name;
114
- this.profiles = [];
115
- this.#profileBeingRecorded = null;
116
- this.#nextProfileUid = 1;
117
111
 
118
112
  if (!window.opener) {
119
113
  window.addEventListener('pagehide', this.clearTempStorage.bind(this), false);
@@ -138,7 +138,7 @@ export class ProfileView extends UI.View.SimpleView implements UI.SearchableView
138
138
  this.searchableViewInternal.setPlaceholder(i18nString(UIStrings.findByCostMsNameOrFile));
139
139
  this.searchableViewInternal.show(this.element);
140
140
 
141
- const columns = ([] as DataGrid.DataGrid.ColumnDescriptor[]);
141
+ const columns: DataGrid.DataGrid.ColumnDescriptor[] = [];
142
142
  columns.push({
143
143
  id: 'self',
144
144
  title: this.columnHeader('self'),
@@ -151,6 +151,7 @@ const UIStrings = {
151
151
  } as const;
152
152
  const str_ = i18n.i18n.registerUIStrings('panels/recorder/RecorderController.ts', UIStrings);
153
153
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
154
+ const {widget} = UI.Widget;
154
155
 
155
156
  const GET_EXTENSIONS_MENU_ITEM = 'get-extensions-link';
156
157
  const GET_EXTENSIONS_URL = 'https://goo.gle/recorder-extension-list' as Platform.DevToolsPath.UrlString;
@@ -1203,7 +1204,7 @@ export class RecorderController extends LitElement {
1203
1204
  // clang-format off
1204
1205
  return html`
1205
1206
  <devtools-widget
1206
- .widgetConfig=${UI.Widget.widgetConfig(Components.RecordingListView.RecordingListView, {
1207
+ ${widget(Components.RecordingListView.RecordingListView, {
1207
1208
  recordings: recordings.map(recording => ({
1208
1209
  storageName: recording.storageName,
1209
1210
  name: recording.flow.title,
@@ -1244,7 +1245,7 @@ export class RecorderController extends LitElement {
1244
1245
  return html`
1245
1246
  <devtools-widget
1246
1247
  class="recording-view"
1247
- .widgetConfig=${UI.Widget.widgetConfig(Components.RecordingView.RecordingView, {
1248
+ ${widget(Components.RecordingView.RecordingView, {
1248
1249
  recording: this.currentRecording?.flow ?? {title: '', steps: []},
1249
1250
  replayState: this.#replayState,
1250
1251
  isRecording: this.isRecording,
@@ -1291,7 +1292,7 @@ export class RecorderController extends LitElement {
1291
1292
  return html`
1292
1293
  <devtools-widget
1293
1294
  class="recording-view"
1294
- .widgetConfig=${UI.Widget.widgetConfig(Components.CreateRecordingView.CreateRecordingView, {
1295
+ ${widget(Components.CreateRecordingView.CreateRecordingView, {
1295
1296
  recorderSettings: this.#recorderSettings,
1296
1297
  onRecordingStarted: this.#onRecordingStarted.bind(this),
1297
1298
  onRecordingCancelled: this.onRecordingCancelled.bind(this),
@@ -101,6 +101,7 @@ const str_ = i18n.i18n.registerUIStrings(
101
101
  UIStrings,
102
102
  );
103
103
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
104
+ const {widget} = UI.Widget;
104
105
 
105
106
  export interface ViewInput {
106
107
  name: string;
@@ -269,7 +270,7 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
269
270
  <div class="controls">
270
271
  <devtools-widget
271
272
  class="control-button"
272
- .widgetConfig=${UI.Widget.widgetConfig(ControlButton, {
273
+ ${widget(ControlButton, {
273
274
  label: i18nString(UIStrings.startRecording),
274
275
  shape: 'circle',
275
276
  onClick: onRecordingStarted,
@@ -597,7 +597,7 @@ function renderSections(input: ViewInput): Lit.LitTemplate {
597
597
  return html`
598
598
  <devtools-widget
599
599
  @copystep=${input.onCopyStep}
600
- .widgetConfig=${UI.Widget.widgetConfig(StepView, {
600
+ ${widget(StepView, {
601
601
  step,
602
602
  state: input.getStepState(step),
603
603
  error: input.currentStep === step ? (input.currentError ?? undefined) : undefined,
@@ -812,7 +812,7 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
812
812
  <div class="controls">
813
813
  <devtools-widget
814
814
  class="control-button"
815
- .widgetConfig=${UI.Widget.widgetConfig(ControlButton, {
815
+ ${widget(ControlButton, {
816
816
  label: footerButtonTitle,
817
817
  shape: 'square',
818
818
  disabled: input.recordingTogglingInProgress,
@@ -2,6 +2,9 @@
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
4
 
5
+ // Clang-formatter and EsLint have a mismatch due to the naming of `puppeteer-replay`
6
+ /* eslint-disable import/order */
7
+
5
8
  import * as Common from '../../../core/common/common.js';
6
9
  import type * as Platform from '../../../core/platform/platform.js';
7
10
  import * as SDK from '../../../core/sdk/sdk.js';
@@ -29,7 +29,7 @@ import {
29
29
  } from './SecurityModel.js';
30
30
  import {SecurityPanelSidebar} from './SecurityPanelSidebar.js';
31
31
 
32
- const {widgetConfig} = UI.Widget;
32
+ const {widget, widgetRef} = UI.Widget;
33
33
 
34
34
  const UIStrings = {
35
35
  /**
@@ -552,8 +552,8 @@ const DEFAULT_VIEW: View = (input: ViewInput, output: ViewOutput, target: HTMLEl
552
552
  ${UI.Widget.widgetRef(UI.SplitWidget.SplitWidget, e => {output.splitWidget = e;})}>
553
553
  <devtools-widget
554
554
  slot="sidebar"
555
- .widgetConfig=${widgetConfig(SecurityPanelSidebar)}
556
- ${UI.Widget.widgetRef(SecurityPanelSidebar, e => {output.sidebar = e;})}>
555
+ ${widget(SecurityPanelSidebar)}
556
+ ${widgetRef(SecurityPanelSidebar, e => {output.sidebar = e;})}>
557
557
  </devtools-widget>
558
558
  </devtools-split-view>`,
559
559
  target);