chrome-devtools-frontend 1.0.1576287 → 1.0.1577886

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 (29) hide show
  1. package/front_end/core/sdk/DebuggerModel.ts +0 -24
  2. package/front_end/generated/InspectorBackendCommands.ts +3 -2
  3. package/front_end/generated/SupportedCSSProperties.js +42 -8
  4. package/front_end/generated/protocol-mapping.d.ts +9 -0
  5. package/front_end/generated/protocol-proxy-api.d.ts +7 -0
  6. package/front_end/generated/protocol.ts +16 -0
  7. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +9 -7
  8. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +33 -58
  9. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +0 -52
  10. package/front_end/models/javascript_metadata/NativeFunctions.js +8 -0
  11. package/front_end/models/stack_trace/StackTrace.ts +14 -19
  12. package/front_end/models/workspace/WorkspaceImpl.ts +1 -1
  13. package/front_end/panels/ai_assistance/components/ChatMessage.ts +5 -1
  14. package/front_end/panels/common/GeminiRebrandPromoDialog.ts +2 -0
  15. package/front_end/panels/css_overview/cssOverviewCompletedView.css +5 -0
  16. package/front_end/panels/network/RequestPayloadView.ts +42 -91
  17. package/front_end/panels/network/ShowMoreDetailsWidget.ts +96 -0
  18. package/front_end/panels/network/network.ts +2 -0
  19. package/front_end/panels/recorder/components/RecordingView.ts +15 -0
  20. package/front_end/panels/sources/CallStackSidebarPane.ts +98 -152
  21. package/front_end/panels/sources/DebuggerPlugin.ts +19 -22
  22. package/front_end/panels/sources/SourcesPanel.ts +6 -24
  23. package/front_end/third_party/chromium/README.chromium +1 -1
  24. package/front_end/ui/components/report_view/ReportView.ts +2 -2
  25. package/front_end/ui/components/report_view/report.css +1 -0
  26. package/front_end/ui/legacy/ContextMenu.ts +12 -7
  27. package/front_end/ui/visual_logging/Debugging.ts +2 -0
  28. package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
  29. package/package.json +1 -1
@@ -150,7 +150,6 @@ export class DebuggerModel extends SDKModel<EventTypes> {
150
150
  start: Location,
151
151
  end: Location,
152
152
  }>>)|null = null;
153
- #expandCallFramesCallback: ((arg0: CallFrame[]) => Promise<CallFrame[]>)|null = null;
154
153
  evaluateOnCallFrameCallback:
155
154
  ((arg0: CallFrame, arg1: EvaluationOptions) => Promise<EvaluationResult|null>)|null = null;
156
155
  #synchronizeBreakpointsCallback: ((script: Script) => Promise<void>)|null = null;
@@ -599,10 +598,6 @@ export class DebuggerModel extends SDKModel<EventTypes> {
599
598
  this.#beforePausedCallback = callback;
600
599
  }
601
600
 
602
- setExpandCallFramesCallback(callback: ((arg0: CallFrame[]) => Promise<CallFrame[]>)|null): void {
603
- this.#expandCallFramesCallback = callback;
604
- }
605
-
606
601
  setEvaluateOnCallFrameCallback(
607
602
  callback: ((arg0: CallFrame, arg1: EvaluationOptions) => Promise<EvaluationResult|null>)|null): void {
608
603
  this.evaluateOnCallFrameCallback = callback;
@@ -627,7 +622,6 @@ export class DebuggerModel extends SDKModel<EventTypes> {
627
622
 
628
623
  const pausedDetails =
629
624
  new DebuggerPausedDetails(this, callFrames, reason, auxData, breakpointIds, asyncStackTrace, asyncStackTraceId);
630
- await this.#expandCallFrames(pausedDetails);
631
625
 
632
626
  if (this.continueToLocationCallback) {
633
627
  const callback = this.continueToLocationCallback;
@@ -648,13 +642,6 @@ export class DebuggerModel extends SDKModel<EventTypes> {
648
642
  }
649
643
  }
650
644
 
651
- /** Delegates to the DebuggerLanguagePlugin and potential attached source maps to expand inlined call frames */
652
- async #expandCallFrames(pausedDetails: DebuggerPausedDetails): Promise<void> {
653
- if (this.#expandCallFramesCallback) {
654
- pausedDetails.callFrames = await this.#expandCallFramesCallback.call(null, pausedDetails.callFrames);
655
- }
656
- }
657
-
658
645
  resumedScript(): void {
659
646
  this.resetDebuggerPausedDetails();
660
647
  this.dispatchEventToListeners(Events.DebuggerResumed, this);
@@ -708,10 +695,6 @@ export class DebuggerModel extends SDKModel<EventTypes> {
708
695
  }
709
696
 
710
697
  async setDebugInfoURL(script: Script, _externalURL: Platform.DevToolsPath.UrlString): Promise<void> {
711
- if (this.#expandCallFramesCallback && this.#debuggerPausedDetails) {
712
- this.#debuggerPausedDetails.callFrames =
713
- await this.#expandCallFramesCallback.call(null, this.#debuggerPausedDetails.callFrames);
714
- }
715
698
  this.dispatchEventToListeners(Events.DebugInfoAttached, script);
716
699
  }
717
700
 
@@ -1186,11 +1169,6 @@ export interface MissingDebugFiles {
1186
1169
  initiator: PageResourceLoadInitiator;
1187
1170
  }
1188
1171
 
1189
- export interface MissingDebugInfoDetails {
1190
- details: string;
1191
- resources: MissingDebugFiles[];
1192
- }
1193
-
1194
1172
  export class CallFrame {
1195
1173
  debuggerModel: DebuggerModel;
1196
1174
  readonly script: Script;
@@ -1202,7 +1180,6 @@ export class CallFrame {
1202
1180
  readonly functionName: string;
1203
1181
  readonly #functionLocation: Location|undefined;
1204
1182
  #returnValue: RemoteObject|null;
1205
- missingDebugInfoDetails: MissingDebugInfoDetails|null;
1206
1183
  readonly exception: RemoteObject|null;
1207
1184
 
1208
1185
  readonly canBeRestarted: boolean;
@@ -1218,7 +1195,6 @@ export class CallFrame {
1218
1195
  this.#localScope = null;
1219
1196
  this.inlineFrameIndex = inlineFrameIndex || 0;
1220
1197
  this.functionName = functionName ?? payload.functionName;
1221
- this.missingDebugInfoDetails = null;
1222
1198
  this.canBeRestarted = Boolean(payload.canBeRestarted);
1223
1199
  this.exception = exception;
1224
1200
  for (let i = 0; i < payload.scopeChain.length; ++i) {
@@ -571,7 +571,8 @@ inspectorBackend.registerCommand("EventBreakpoints.disable", [], [], "Removes al
571
571
 
572
572
  // Extensions.
573
573
  inspectorBackend.registerEnum("Extensions.StorageArea", {Session: "session", Local: "local", Sync: "sync", Managed: "managed"});
574
- inspectorBackend.registerCommand("Extensions.loadUnpacked", [{"name": "path", "type": "string", "optional": false, "description": "Absolute file path.", "typeRef": null}], ["id"], "Installs an unpacked extension from the filesystem similar to --load-extension CLI flags. Returns extension ID once the extension has been installed. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging flag is set.");
574
+ inspectorBackend.registerCommand("Extensions.triggerAction", [{"name": "id", "type": "string", "optional": false, "description": "Extension id.", "typeRef": null}, {"name": "targetId", "type": "string", "optional": false, "description": "A tab target ID to trigger the default extension action on.", "typeRef": null}], [], "Runs an extension default action. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging flag is set.");
575
+ inspectorBackend.registerCommand("Extensions.loadUnpacked", [{"name": "path", "type": "string", "optional": false, "description": "Absolute file path.", "typeRef": null}, {"name": "enableInIncognito", "type": "boolean", "optional": true, "description": "Enable the extension in incognito", "typeRef": null}], ["id"], "Installs an unpacked extension from the filesystem similar to --load-extension CLI flags. Returns extension ID once the extension has been installed. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging flag is set.");
575
576
  inspectorBackend.registerCommand("Extensions.uninstall", [{"name": "id", "type": "string", "optional": false, "description": "Extension id.", "typeRef": null}], [], "Uninstalls an unpacked extension (others not supported) from the profile. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging.");
576
577
  inspectorBackend.registerCommand("Extensions.getStorageItems", [{"name": "id", "type": "string", "optional": false, "description": "ID of extension.", "typeRef": null}, {"name": "storageArea", "type": "string", "optional": false, "description": "StorageArea to retrieve data from.", "typeRef": "Extensions.StorageArea"}, {"name": "keys", "type": "array", "optional": true, "description": "Keys to retrieve.", "typeRef": "string"}], ["data"], "Gets data from extension storage in the given `storageArea`. If `keys` is specified, these are used to filter the result.");
577
578
  inspectorBackend.registerCommand("Extensions.removeStorageItems", [{"name": "id", "type": "string", "optional": false, "description": "ID of extension.", "typeRef": null}, {"name": "storageArea", "type": "string", "optional": false, "description": "StorageArea to remove data from.", "typeRef": "Extensions.StorageArea"}, {"name": "keys", "type": "array", "optional": false, "description": "Keys to remove.", "typeRef": "string"}], [], "Removes `keys` from extension storage in the given `storageArea`.");
@@ -1268,7 +1269,7 @@ inspectorBackend.registerCommand("SmartCardEmulation.reportEstablishContextResul
1268
1269
  inspectorBackend.registerCommand("SmartCardEmulation.reportReleaseContextResult", [{"name": "requestId", "type": "string", "optional": false, "description": "", "typeRef": null}], [], "Reports the successful result of a |SCardReleaseContext| call. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga6aabcba7744c5c9419fdd6404f73a934 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardreleasecontext");
1269
1270
  inspectorBackend.registerCommand("SmartCardEmulation.reportListReadersResult", [{"name": "requestId", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "readers", "type": "array", "optional": false, "description": "", "typeRef": "string"}], [], "Reports the successful result of a |SCardListReaders| call. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga93b07815789b3cf2629d439ecf20f0d9 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardlistreadersa");
1270
1271
  inspectorBackend.registerCommand("SmartCardEmulation.reportGetStatusChangeResult", [{"name": "requestId", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "readerStates", "type": "array", "optional": false, "description": "", "typeRef": "SmartCardEmulation.ReaderStateOut"}], [], "Reports the successful result of a |SCardGetStatusChange| call. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga33247d5d1257d59e55647c3bb717db24 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetstatuschangea");
1271
- inspectorBackend.registerCommand("SmartCardEmulation.reportBeginTransactionResult", [{"name": "requestId", "type": "string", "optional": false, "description": "", "typeRef": null}], [], "Reports the result of a |SCardBeginTransaction| call. On success, this creates a new transaction object. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaddb835dce01a0da1d6ca02d33ee7d861 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardbegintransaction");
1272
+ inspectorBackend.registerCommand("SmartCardEmulation.reportBeginTransactionResult", [{"name": "requestId", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "handle", "type": "number", "optional": false, "description": "", "typeRef": null}], [], "Reports the result of a |SCardBeginTransaction| call. On success, this creates a new transaction object. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaddb835dce01a0da1d6ca02d33ee7d861 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardbegintransaction");
1272
1273
  inspectorBackend.registerCommand("SmartCardEmulation.reportPlainResult", [{"name": "requestId", "type": "string", "optional": false, "description": "", "typeRef": null}], [], "Reports the successful result of a call that returns only a result code. Used for: |SCardCancel|, |SCardDisconnect|, |SCardSetAttrib|, |SCardEndTransaction|. This maps to: 1. SCardCancel PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacbbc0c6d6c0cbbeb4f4debf6fbeeee6 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcancel 2. SCardDisconnect PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4be198045c73ec0deb79e66c0ca1738a Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scarddisconnect 3. SCardSetAttrib PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga060f0038a4ddfd5dd2b8fadf3c3a2e4f Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardsetattrib 4. SCardEndTransaction PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae8742473b404363e5c587f570d7e2f3b Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardendtransaction");
1273
1274
  inspectorBackend.registerCommand("SmartCardEmulation.reportConnectResult", [{"name": "requestId", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "handle", "type": "number", "optional": false, "description": "", "typeRef": null}, {"name": "activeProtocol", "type": "string", "optional": true, "description": "", "typeRef": "SmartCardEmulation.Protocol"}], [], "Reports the successful result of a |SCardConnect| call. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4e515829752e0a8dbc4d630696a8d6a5 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardconnecta");
1274
1275
  inspectorBackend.registerCommand("SmartCardEmulation.reportDataResult", [{"name": "requestId", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "data", "type": "string", "optional": false, "description": "", "typeRef": null}], [], "Reports the successful result of a call that sends back data on success. Used for |SCardTransmit|, |SCardControl|, and |SCardGetAttrib|. This maps to: 1. SCardTransmit PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga9a2d77242a271310269065e64633ab99 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardtransmit 2. SCardControl PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gac3454d4657110fd7f753b2d3d8f4e32f Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcontrol 3. SCardGetAttrib PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacfec51917255b7a25b94c5104961602 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetattrib");
@@ -499,6 +499,7 @@ export const generatedProperties = [
499
499
  "font-variation-settings",
500
500
  "font-weight",
501
501
  "forced-color-adjust",
502
+ "frame-sizing",
502
503
  "gap-rule-overlap",
503
504
  "grid-auto-columns",
504
505
  "grid-auto-flow",
@@ -518,6 +519,7 @@ export const generatedProperties = [
518
519
  "hyphenate-character",
519
520
  "hyphenate-limit-chars",
520
521
  "hyphens",
522
+ "image-animation",
521
523
  "image-orientation",
522
524
  "image-rendering",
523
525
  "inherits",
@@ -1723,8 +1725,7 @@ export const generatedProperties = [
1723
1725
  "inherited": false,
1724
1726
  "keywords": [
1725
1727
  "none",
1726
- "auto",
1727
- "spanning-item",
1728
+ "normal",
1728
1729
  "intersection"
1729
1730
  ],
1730
1731
  "name": "column-rule-break"
@@ -2597,6 +2598,16 @@ export const generatedProperties = [
2597
2598
  ],
2598
2599
  "name": "forced-color-adjust"
2599
2600
  },
2601
+ {
2602
+ "keywords": [
2603
+ "auto",
2604
+ "content-width",
2605
+ "content-height",
2606
+ "content-block-size",
2607
+ "content-inline-size"
2608
+ ],
2609
+ "name": "frame-sizing"
2610
+ },
2600
2611
  {
2601
2612
  "longhands": [
2602
2613
  "row-gap",
@@ -2678,6 +2689,7 @@ export const generatedProperties = [
2678
2689
  "longhands": [
2679
2690
  "grid-template-areas",
2680
2691
  "grid-template-columns",
2692
+ "grid-template-rows",
2681
2693
  "grid-lanes-direction"
2682
2694
  ],
2683
2695
  "name": "grid-lanes"
@@ -2779,6 +2791,15 @@ export const generatedProperties = [
2779
2791
  ],
2780
2792
  "name": "hyphens"
2781
2793
  },
2794
+ {
2795
+ "inherited": true,
2796
+ "keywords": [
2797
+ "normal",
2798
+ "running",
2799
+ "paused"
2800
+ ],
2801
+ "name": "image-animation"
2802
+ },
2782
2803
  {
2783
2804
  "inherited": true,
2784
2805
  "name": "image-orientation"
@@ -3753,8 +3774,7 @@ export const generatedProperties = [
3753
3774
  "inherited": false,
3754
3775
  "keywords": [
3755
3776
  "none",
3756
- "auto",
3757
- "spanning-item",
3777
+ "normal",
3758
3778
  "intersection"
3759
3779
  ],
3760
3780
  "name": "row-rule-break"
@@ -5506,8 +5526,7 @@ export const generatedPropertyValues = {
5506
5526
  "column-rule-break": {
5507
5527
  "values": [
5508
5528
  "none",
5509
- "auto",
5510
- "spanning-item",
5529
+ "normal",
5511
5530
  "intersection"
5512
5531
  ]
5513
5532
  },
@@ -6034,6 +6053,15 @@ export const generatedPropertyValues = {
6034
6053
  "preserve-parent-color"
6035
6054
  ]
6036
6055
  },
6056
+ "frame-sizing": {
6057
+ "values": [
6058
+ "auto",
6059
+ "content-width",
6060
+ "content-height",
6061
+ "content-block-size",
6062
+ "content-inline-size"
6063
+ ]
6064
+ },
6037
6065
  "gap-rule-overlap": {
6038
6066
  "values": [
6039
6067
  "row-over-column",
@@ -6130,6 +6158,13 @@ export const generatedPropertyValues = {
6130
6158
  "auto"
6131
6159
  ]
6132
6160
  },
6161
+ "image-animation": {
6162
+ "values": [
6163
+ "normal",
6164
+ "running",
6165
+ "paused"
6166
+ ]
6167
+ },
6133
6168
  "image-rendering": {
6134
6169
  "values": [
6135
6170
  "auto",
@@ -6628,8 +6663,7 @@ export const generatedPropertyValues = {
6628
6663
  "row-rule-break": {
6629
6664
  "values": [
6630
6665
  "none",
6631
- "auto",
6632
- "spanning-item",
6666
+ "normal",
6633
6667
  "intersection"
6634
6668
  ]
6635
6669
  },
@@ -2790,6 +2790,15 @@ export namespace ProtocolMapping {
2790
2790
  paramsType: [];
2791
2791
  returnType: void;
2792
2792
  };
2793
+ /**
2794
+ * Runs an extension default action.
2795
+ * Available if the client is connected using the --remote-debugging-pipe
2796
+ * flag and the --enable-unsafe-extension-debugging flag is set.
2797
+ */
2798
+ 'Extensions.triggerAction': {
2799
+ paramsType: [Protocol.Extensions.TriggerActionRequest];
2800
+ returnType: void;
2801
+ };
2793
2802
  /**
2794
2803
  * Installs an unpacked extension from the filesystem similar to
2795
2804
  * --load-extension CLI flags. Returns extension ID once the extension
@@ -1876,6 +1876,13 @@ declare namespace ProtocolProxyApi {
1876
1876
  }
1877
1877
 
1878
1878
  export interface ExtensionsApi {
1879
+ /**
1880
+ * Runs an extension default action.
1881
+ * Available if the client is connected using the --remote-debugging-pipe
1882
+ * flag and the --enable-unsafe-extension-debugging flag is set.
1883
+ */
1884
+ invoke_triggerAction(params: Protocol.Extensions.TriggerActionRequest): Promise<Protocol.ProtocolResponseWithError>;
1885
+
1879
1886
  /**
1880
1887
  * Installs an unpacked extension from the filesystem similar to
1881
1888
  * --load-extension CLI flags. Returns extension ID once the extension
@@ -7481,11 +7481,26 @@ export namespace Extensions {
7481
7481
  Managed = 'managed',
7482
7482
  }
7483
7483
 
7484
+ export interface TriggerActionRequest {
7485
+ /**
7486
+ * Extension id.
7487
+ */
7488
+ id: string;
7489
+ /**
7490
+ * A tab target ID to trigger the default extension action on.
7491
+ */
7492
+ targetId: string;
7493
+ }
7494
+
7484
7495
  export interface LoadUnpackedRequest {
7485
7496
  /**
7486
7497
  * Absolute file path.
7487
7498
  */
7488
7499
  path: string;
7500
+ /**
7501
+ * Enable the extension in incognito
7502
+ */
7503
+ enableInIncognito?: boolean;
7489
7504
  }
7490
7505
 
7491
7506
  export interface LoadUnpackedResponse extends ProtocolResponseWithError {
@@ -17395,6 +17410,7 @@ export namespace SmartCardEmulation {
17395
17410
 
17396
17411
  export interface ReportBeginTransactionResultRequest {
17397
17412
  requestId: string;
17413
+ handle: integer;
17398
17414
  }
17399
17415
 
17400
17416
  export interface ReportPlainResultRequest {
@@ -3,6 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as Host from '../../../core/host/host.js';
6
+ import * as i18n from '../../../core/i18n/i18n.js';
6
7
  import * as Platform from '../../../core/platform/platform.js';
7
8
  import * as Root from '../../../core/root/root.js';
8
9
  import * as Logs from '../../logs/logs.js';
@@ -14,6 +15,7 @@ import {
14
15
  type RequestOptions,
15
16
  } from './AiAgent.js';
16
17
 
18
+ const lockedString = i18n.i18n.lockedString;
17
19
  /**
18
20
  * WARNING: preamble defined in code is only used when userTier is
19
21
  * TESTERS. Otherwise, a server-side preamble is used (see
@@ -78,13 +80,10 @@ export class ContextSelectionAgent extends AiAgent<never> {
78
80
  required: [],
79
81
  properties: {},
80
82
  },
81
- handler: async (_params, options) => {
82
- if (!options?.approved) {
83
- return {
84
- requiresApproval: true,
85
- };
86
- }
87
-
83
+ displayInfoFromArgs: () => {
84
+ return {title: lockedString('Listing network requests…')};
85
+ },
86
+ handler: async () => {
88
87
  const requestURls = [];
89
88
  for (const request of Logs.NetworkLog.NetworkLog.instance().requests()) {
90
89
  requestURls.push(request.url());
@@ -111,6 +110,9 @@ export class ContextSelectionAgent extends AiAgent<never> {
111
110
  },
112
111
  },
113
112
  },
113
+ displayInfoFromArgs: args => {
114
+ return {title: lockedString('Getting network request…'), action: `selectNetworkRequest(${args.url})`};
115
+ },
114
116
  handler: async ({url}) => {
115
117
  // TODO: Switch to using IDs to make is easier to link to as well.
116
118
  const request = Logs.NetworkLog.NetworkLog.instance().requests().find(req => {
@@ -58,16 +58,6 @@ const UIStrings = {
58
58
  * @example {File not found} PH3
59
59
  */
60
60
  failedToLoadDebugSymbolsFor: '[{PH1}] Failed to load debug symbols for {PH2} ({PH3})',
61
- /**
62
- * @description Error message that is displayed in UI debugging information cannot be found for a call frame
63
- * @example {main} PH1
64
- */
65
- failedToLoadDebugSymbolsForFunction: 'No debug information for function "{PH1}"',
66
- /**
67
- * @description Error message that is displayed in UI when a file needed for debugging information for a call frame is missing
68
- * @example {mainp.debug.wasm.dwp} PH1
69
- */
70
- debugSymbolsIncomplete: 'The debug information for function {PH1} is incomplete',
71
61
  } as const;
72
62
  const str_ = i18n.i18n.registerUIStrings('models/bindings/DebuggerLanguagePlugins.ts', UIStrings);
73
63
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -499,37 +489,12 @@ export class DebuggerLanguagePluginManager implements
499
489
  return this.callFrameByStopId.get(stopId);
500
490
  }
501
491
 
502
- private expandCallFrames(callFrames: SDK.DebuggerModel.CallFrame[]): Promise<SDK.DebuggerModel.CallFrame[]> {
503
- return Promise
504
- .all(callFrames.map(async callFrame => {
505
- const functionInfo = await this.getFunctionInfo(callFrame.script, callFrame.location());
506
- if (functionInfo) {
507
- if ('frames' in functionInfo && functionInfo.frames.length) {
508
- return functionInfo.frames.map(({name}, index) => callFrame.createVirtualCallFrame(index, name));
509
- }
510
- if ('missingSymbolFiles' in functionInfo && functionInfo.missingSymbolFiles.length) {
511
- const resources = functionInfo.missingSymbolFiles;
512
- const details = i18nString(UIStrings.debugSymbolsIncomplete, {PH1: callFrame.functionName});
513
- callFrame.missingDebugInfoDetails = {details, resources};
514
- } else {
515
- callFrame.missingDebugInfoDetails = {
516
- details: i18nString(UIStrings.failedToLoadDebugSymbolsForFunction, {PH1: callFrame.functionName}),
517
- resources: [],
518
- };
519
- }
520
- }
521
- return callFrame;
522
- }))
523
- .then(callFrames => callFrames.flat());
524
- }
525
-
526
492
  modelAdded(debuggerModel: SDK.DebuggerModel.DebuggerModel): void {
527
493
  this.#debuggerModelToData.set(debuggerModel, new ModelData(debuggerModel, this.#workspace));
528
494
  debuggerModel.addEventListener(SDK.DebuggerModel.Events.GlobalObjectCleared, this.globalObjectCleared, this);
529
495
  debuggerModel.addEventListener(SDK.DebuggerModel.Events.ParsedScriptSource, this.parsedScriptSource, this);
530
496
  debuggerModel.addEventListener(SDK.DebuggerModel.Events.DebuggerResumed, this.debuggerResumed, this);
531
497
  debuggerModel.setEvaluateOnCallFrameCallback(this.evaluateOnCallFrame.bind(this));
532
- debuggerModel.setExpandCallFramesCallback(this.expandCallFrames.bind(this));
533
498
  }
534
499
 
535
500
  modelRemoved(debuggerModel: SDK.DebuggerModel.DebuggerModel): void {
@@ -537,7 +502,6 @@ export class DebuggerLanguagePluginManager implements
537
502
  debuggerModel.removeEventListener(SDK.DebuggerModel.Events.ParsedScriptSource, this.parsedScriptSource, this);
538
503
  debuggerModel.removeEventListener(SDK.DebuggerModel.Events.DebuggerResumed, this.debuggerResumed, this);
539
504
  debuggerModel.setEvaluateOnCallFrameCallback(null);
540
- debuggerModel.setExpandCallFramesCallback(null);
541
505
  const modelData = this.#debuggerModelToData.get(debuggerModel);
542
506
  if (modelData) {
543
507
  modelData.dispose();
@@ -792,26 +756,18 @@ export class DebuggerLanguagePluginManager implements
792
756
  const rawLocation = new SDK.DebuggerModel.Location(
793
757
  script.debuggerModel, script.scriptId, frame.lineNumber, frame.columnNumber, index);
794
758
  const uiLocation = await this.rawLocationToUILocation(rawLocation);
795
- return {
796
- uiSourceCode: uiLocation?.uiSourceCode,
797
- url: uiLocation ? undefined : frame.url,
798
- name,
799
- line: uiLocation?.lineNumber ?? frame.lineNumber,
800
- column: uiLocation?.columnNumber ?? frame.columnNumber,
801
- };
759
+ return translatedFromUILocation(uiLocation, name, frame);
802
760
  });
803
761
 
804
762
  translatedFrames.push(await Promise.all(framePromises));
805
763
  return true;
806
764
  }
807
765
 
808
- // Identity map the frame, then add the missing debug info details.
809
- const mappedFrame: (typeof translatedFrames)[number][number] = {
810
- url: frame.url,
811
- name: frame.functionName,
812
- line: frame.lineNumber,
813
- column: frame.columnNumber,
814
- };
766
+ // Translate the location only. We go through via "DebuggerWorkspaceBinding". It'll still try the plugin
767
+ // first, but this way, we'll get a UISourceCode for the raw script if the plugin fails to translate.
768
+ const uiLocation = await this.#debuggerWorkspaceBinding.rawLocationToUILocation(
769
+ new SDK.DebuggerModel.Location(script.debuggerModel, script.scriptId, frame.lineNumber, frame.columnNumber));
770
+ const mappedFrame = translatedFromUILocation(uiLocation, frame.functionName, frame);
815
771
 
816
772
  if ('missingSymbolFiles' in functionInfo && functionInfo.missingSymbolFiles.length) {
817
773
  translatedFrames.push([{
@@ -831,6 +787,27 @@ export class DebuggerLanguagePluginManager implements
831
787
  }
832
788
 
833
789
  return true;
790
+
791
+ function translatedFromUILocation(
792
+ uiLocation: Workspace.UISourceCode.UILocation|null, name: string|undefined,
793
+ fallback: StackTraceImpl.Trie.RawFrame): (typeof translatedFrames)[number][number] {
794
+ if (uiLocation) {
795
+ return {
796
+ uiSourceCode: uiLocation.uiSourceCode,
797
+ url: undefined,
798
+ name,
799
+ line: uiLocation.lineNumber,
800
+ column: uiLocation.columnNumber ?? -1,
801
+ };
802
+ }
803
+ return {
804
+ uiSourceCode: undefined,
805
+ url: fallback.url,
806
+ name: fallback.functionName,
807
+ line: fallback.lineNumber,
808
+ column: fallback.columnNumber,
809
+ };
810
+ }
834
811
  }
835
812
 
836
813
  scriptsForUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): SDK.Script.Script[] {
@@ -920,15 +897,13 @@ export class DebuggerLanguagePluginManager implements
920
897
  // for the DebuggerModel again, which may disappear
921
898
  // in the meantime...
922
899
  void rawModuleHandle.addRawModulePromise.then(sourceFileURLs => {
923
- if (!('missingSymbolFiles' in sourceFileURLs)) {
924
- // The script might have disappeared meanwhile...
925
- if (script.debuggerModel.scriptForId(script.scriptId) === script) {
926
- const modelData = this.#debuggerModelToData.get(script.debuggerModel);
927
- if (modelData) { // The DebuggerModel could have disappeared meanwhile...
928
- modelData.addSourceFiles(script, sourceFileURLs);
929
- void this.#debuggerWorkspaceBinding.updateLocations(script);
930
- }
900
+ // The script might have disappeared meanwhile...
901
+ if (script.debuggerModel.scriptForId(script.scriptId) === script) {
902
+ const modelData = this.#debuggerModelToData.get(script.debuggerModel);
903
+ if (modelData && Array.isArray(sourceFileURLs)) { // The DebuggerModel could have disappeared meanwhile...
904
+ modelData.addSourceFiles(script, sourceFileURLs);
931
905
  }
906
+ void this.#debuggerWorkspaceBinding.updateLocations(script);
932
907
  }
933
908
  });
934
909
  return;
@@ -38,10 +38,6 @@ export class DebuggerWorkspaceBinding implements SDK.TargetManager.SDKModelObser
38
38
  this.workspace = workspace;
39
39
 
40
40
  this.#debuggerModelToData = new Map();
41
- targetManager.addModelListener(
42
- SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.GlobalObjectCleared, this.globalObjectCleared, this);
43
- targetManager.addModelListener(
44
- SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.DebuggerResumed, this.debuggerResumed, this);
45
41
  targetManager.observeModels(SDK.DebuggerModel.DebuggerModel, this);
46
42
  this.ignoreListManager.addEventListener(
47
43
  Workspace.IgnoreListManager.Events.IGNORED_SCRIPT_RANGES_UPDATED, event => this.updateLocations(event.data));
@@ -221,24 +217,6 @@ export class DebuggerWorkspaceBinding implements SDK.TargetManager.SDKModelObser
221
217
  return await locationPromise;
222
218
  }
223
219
 
224
- async createCallFrameLiveLocation(
225
- location: SDK.DebuggerModel.Location, updateDelegate: (arg0: LiveLocation) => Promise<void>,
226
- locationPool: LiveLocationPool): Promise<Location|null> {
227
- const script = location.script();
228
- if (!script) {
229
- return null;
230
- }
231
- const debuggerModel = location.debuggerModel;
232
- const liveLocationPromise = this.createLiveLocation(location, updateDelegate, locationPool);
233
- this.recordLiveLocationChange(liveLocationPromise);
234
- const liveLocation = await liveLocationPromise;
235
- if (!liveLocation) {
236
- return null;
237
- }
238
- this.registerCallFrameLiveLocation(debuggerModel, liveLocation);
239
- return liveLocation;
240
- }
241
-
242
220
  async rawLocationToUILocation(rawLocation: SDK.DebuggerModel.Location):
243
221
  Promise<Workspace.UISourceCode.UILocation|null> {
244
222
  const uiLocation = await this.pluginManager.rawLocationToUILocation(rawLocation);
@@ -409,21 +387,6 @@ export class DebuggerWorkspaceBinding implements SDK.TargetManager.SDKModelObser
409
387
  return scripts.every(script => script.isJavaScript());
410
388
  }
411
389
 
412
- private globalObjectCleared(event: Common.EventTarget.EventTargetEvent<SDK.DebuggerModel.DebuggerModel>): void {
413
- this.reset(event.data);
414
- }
415
-
416
- private reset(debuggerModel: SDK.DebuggerModel.DebuggerModel): void {
417
- const modelData = this.#debuggerModelToData.get(debuggerModel);
418
- if (!modelData) {
419
- return;
420
- }
421
- for (const location of modelData.callFrameLocations.values()) {
422
- this.removeLiveLocation(location);
423
- }
424
- modelData.callFrameLocations.clear();
425
- }
426
-
427
390
  resetForTest(target: SDK.Target.Target): void {
428
391
  const debuggerModel = (target.model(SDK.DebuggerModel.DebuggerModel) as SDK.DebuggerModel.DebuggerModel);
429
392
  const modelData = this.#debuggerModelToData.get(debuggerModel);
@@ -432,14 +395,6 @@ export class DebuggerWorkspaceBinding implements SDK.TargetManager.SDKModelObser
432
395
  }
433
396
  }
434
397
 
435
- private registerCallFrameLiveLocation(debuggerModel: SDK.DebuggerModel.DebuggerModel, location: Location): void {
436
- const modelData = this.#debuggerModelToData.get(debuggerModel);
437
- if (modelData) {
438
- const locations = modelData.callFrameLocations;
439
- locations.add(location);
440
- }
441
- }
442
-
443
398
  removeLiveLocation(location: Location): void {
444
399
  const modelData = this.#debuggerModelToData.get(location.rawLocation.debuggerModel);
445
400
  if (modelData) {
@@ -447,10 +402,6 @@ export class DebuggerWorkspaceBinding implements SDK.TargetManager.SDKModelObser
447
402
  }
448
403
  }
449
404
 
450
- private debuggerResumed(event: Common.EventTarget.EventTargetEvent<SDK.DebuggerModel.DebuggerModel>): void {
451
- this.reset(event.data);
452
- }
453
-
454
405
  private async shouldPause(
455
406
  debuggerPausedDetails: SDK.DebuggerModel.DebuggerPausedDetails,
456
407
  autoSteppingContext: SDK.DebuggerModel.Location|null): Promise<boolean> {
@@ -509,7 +460,6 @@ export class DebuggerWorkspaceBinding implements SDK.TargetManager.SDKModelObser
509
460
  class ModelData {
510
461
  readonly #debuggerModel: SDK.DebuggerModel.DebuggerModel;
511
462
  readonly #debuggerWorkspaceBinding: DebuggerWorkspaceBinding;
512
- callFrameLocations: Set<Location>;
513
463
  #defaultMapping: DefaultScriptMapping;
514
464
  readonly #resourceMapping: ResourceMapping;
515
465
  #resourceScriptMapping: ResourceScriptMapping;
@@ -520,8 +470,6 @@ class ModelData {
520
470
  this.#debuggerModel = debuggerModel;
521
471
  this.#debuggerWorkspaceBinding = debuggerWorkspaceBinding;
522
472
 
523
- this.callFrameLocations = new Set();
524
-
525
473
  const {workspace} = debuggerWorkspaceBinding.resourceMapping;
526
474
  this.#defaultMapping = new DefaultScriptMapping(debuggerModel, workspace, debuggerWorkspaceBinding);
527
475
  this.#resourceMapping = debuggerWorkspaceBinding.resourceMapping;
@@ -7137,10 +7137,18 @@ export const NativeFunctions = [
7137
7137
  name: "intercept",
7138
7138
  signatures: [["?options"]]
7139
7139
  },
7140
+ {
7141
+ name: "deferPageSwap",
7142
+ signatures: [["options"]]
7143
+ },
7140
7144
  {
7141
7145
  name: "NavigationCurrentEntryChangeEvent",
7142
7146
  signatures: [["type","eventInit"]]
7143
7147
  },
7148
+ {
7149
+ name: "addRestoreCallback",
7150
+ signatures: [["callback"]]
7151
+ },
7144
7152
  {
7145
7153
  name: "addHandler",
7146
7154
  signatures: [["handler"]]