chrome-devtools-frontend 1.0.1577886 → 1.0.1578729
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/front_end/core/common/Revealer.ts +0 -5
- package/front_end/core/sdk/ConsoleModel.ts +0 -3
- package/front_end/core/sdk/HeapProfilerModel.ts +7 -1
- package/front_end/generated/InspectorBackendCommands.ts +2 -2
- package/front_end/generated/protocol.ts +2 -2
- package/front_end/models/ai_assistance/AiConversation.ts +42 -22
- package/front_end/models/issues_manager/CookieIssue.ts +0 -1
- package/front_end/models/issues_manager/IssuesManager.ts +2 -15
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +17 -25
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +0 -1
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +4 -7
- package/front_end/panels/ai_assistance/components/ChatView.ts +1 -1
- package/front_end/panels/application/DeviceBoundSessionsView.ts +76 -51
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.css +0 -5
- package/front_end/panels/console/ConsoleViewMessage.ts +0 -32
- package/front_end/panels/console/consoleView.css +0 -5
- package/front_end/panels/media/PlayerListView.ts +13 -1
- package/front_end/panels/media/playerListView.css +5 -0
- package/front_end/panels/network/NetworkItemView.ts +2 -1
- package/front_end/panels/network/NetworkLogViewColumns.ts +17 -6
- package/front_end/panels/network/RequestInitiatorView.ts +20 -4
- package/front_end/panels/network/RequestPayloadView.ts +253 -280
- package/front_end/panels/network/ShowMoreDetailsWidget.ts +3 -3
- package/front_end/panels/network/requestPayloadTree.css +6 -3
- package/front_end/panels/network/requestPayloadView.css +1 -0
- package/front_end/panels/security/SecurityPanel.ts +0 -16
- package/front_end/panels/security/security-meta.ts +1 -15
- package/front_end/panels/settings/keybindsSettingsTab.css +57 -0
- package/front_end/panels/sources/CallStackSidebarPane.ts +1 -1
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/buttons/Button.ts +1 -1
- package/front_end/ui/legacy/InspectorView.ts +6 -5
- package/front_end/ui/legacy/Treeoutline.ts +81 -22
- package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +2 -1
- package/front_end/ui/legacy/softDropDown.css +7 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
- package/mcp/mcp.ts +2 -0
- package/package.json +1 -1
|
@@ -582,25 +582,27 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTML
|
|
|
582
582
|
<devtools-report>
|
|
583
583
|
<devtools-report-section-header role="heading" aria-level="2">${
|
|
584
584
|
i18nString(UIStrings.sessionConfig)}</devtools-report-section-header>
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
585
|
+
${renderKeyValue(i18nString(UIStrings.keySite), key.site, 'dbsc-site')}
|
|
586
|
+
${renderKeyValue(i18nString(UIStrings.keyId), key.id, 'dbsc-id')}
|
|
587
|
+
${renderKeyValue(i18nString(UIStrings.refreshUrl), sessionAndEvents.session.refreshUrl, 'dbsc-refresh-url')}
|
|
588
|
+
${
|
|
589
|
+
renderKeyValue(
|
|
590
|
+
i18nString(UIStrings.expiryDate), new Date(sessionAndEvents.session.expiryDate * 1000).toLocaleString(),
|
|
591
|
+
'dbsc-expiry-date')}
|
|
592
|
+
${
|
|
593
|
+
renderKeyValue(
|
|
594
|
+
i18nString(UIStrings.cachedChallenge), sessionAndEvents.session.cachedChallenge || '',
|
|
595
|
+
'dbsc-cached-challenge')}
|
|
596
|
+
${
|
|
597
|
+
renderKeyValue(
|
|
598
|
+
i18nString(UIStrings.allowedRefreshInitiators),
|
|
599
|
+
sessionAndEvents.session.allowedRefreshInitiators.join(', '), 'dbsc-allowed-refresh-initiators')}
|
|
598
600
|
<devtools-report-section-header role="heading" aria-level="2">${
|
|
599
601
|
i18nString(UIStrings.scope)}</devtools-report-section-header>
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
602
|
+
${renderKeyValue(i18nString(UIStrings.origin), inclusionRules.origin, 'dbsc-origin')}
|
|
603
|
+
${
|
|
604
|
+
renderKeyValue(
|
|
605
|
+
i18nString(UIStrings.includeSite), boolToString(inclusionRules.includeSite), 'dbsc-include-site')}
|
|
604
606
|
</devtools-report>
|
|
605
607
|
${
|
|
606
608
|
inclusionRules.urlRules.length > 0 ? html`
|
|
@@ -708,62 +710,78 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTML
|
|
|
708
710
|
const creationEventDetails =
|
|
709
711
|
selectedEvent?.creationEventDetails &&
|
|
710
712
|
html`
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
713
|
+
${
|
|
714
|
+
renderKeyValue(
|
|
715
|
+
i18nString(UIStrings.fetchResult), fetchResultToString(selectedEvent.creationEventDetails.fetchResult),
|
|
716
|
+
'dbsc-creation-fetch-result')}
|
|
717
|
+
${
|
|
718
|
+
selectedEvent.creationEventDetails.newSession &&
|
|
719
|
+
html`
|
|
720
|
+
${
|
|
721
|
+
renderKeyValue(
|
|
722
|
+
i18nString(UIStrings.updatedSessionConfig), i18nString(UIStrings.yes),
|
|
723
|
+
'dbsc-creation-updated-session-config')}
|
|
717
724
|
`}
|
|
718
725
|
`;
|
|
719
726
|
const refreshEventDetails =
|
|
720
727
|
selectedEvent?.refreshEventDetails &&
|
|
721
728
|
html`
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
729
|
+
${
|
|
730
|
+
renderKeyValue(
|
|
731
|
+
i18nString(UIStrings.refreshResult),
|
|
732
|
+
refreshResultToString(selectedEvent.refreshEventDetails.refreshResult), 'dbsc-refresh-result')}
|
|
733
|
+
${
|
|
734
|
+
renderKeyValue(
|
|
735
|
+
i18nString(UIStrings.causedAnyRequestDeferrals),
|
|
736
|
+
boolToString(!selectedEvent.refreshEventDetails.wasFullyProactiveRefresh),
|
|
737
|
+
'dbsc-refresh-was-fully-proactive-refresh')}
|
|
728
738
|
${
|
|
729
739
|
selectedEvent.refreshEventDetails.fetchResult &&
|
|
730
740
|
html`
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
741
|
+
${
|
|
742
|
+
renderKeyValue(
|
|
743
|
+
i18nString(UIStrings.fetchResult), fetchResultToString(selectedEvent.refreshEventDetails.fetchResult),
|
|
744
|
+
'dbsc-refresh-fetch-result')}
|
|
734
745
|
`}
|
|
735
|
-
${
|
|
736
|
-
|
|
737
|
-
|
|
746
|
+
${
|
|
747
|
+
selectedEvent.refreshEventDetails.newSession &&
|
|
748
|
+
html`
|
|
749
|
+
${
|
|
750
|
+
renderKeyValue(
|
|
751
|
+
i18nString(UIStrings.updatedSessionConfig), i18nString(UIStrings.yes),
|
|
752
|
+
'dbsc-refresh-updated-session-config')}
|
|
738
753
|
`}
|
|
739
754
|
`;
|
|
740
755
|
const challengeEventDetails =
|
|
741
756
|
selectedEvent?.challengeEventDetails &&
|
|
742
757
|
html`
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
758
|
+
${
|
|
759
|
+
renderKeyValue(
|
|
760
|
+
i18nString(UIStrings.challengeResult),
|
|
761
|
+
challengeResultToString(selectedEvent.challengeEventDetails.challengeResult), 'dbsc-challenge-result')}
|
|
762
|
+
${
|
|
763
|
+
renderKeyValue(
|
|
764
|
+
i18nString(UIStrings.challenge), selectedEvent.challengeEventDetails.challenge, 'dbsc-challenge')}
|
|
748
765
|
`;
|
|
749
766
|
const terminationEventDetails =
|
|
750
767
|
selectedEvent?.terminationEventDetails &&
|
|
751
768
|
html`
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
769
|
+
${
|
|
770
|
+
renderKeyValue(
|
|
771
|
+
i18nString(UIStrings.deletionReason),
|
|
772
|
+
deletionReasonToString(selectedEvent.terminationEventDetails.deletionReason), 'dbsc-termination-reason')}
|
|
755
773
|
`;
|
|
756
774
|
const eventDetailsContentHtml = selectedEvent ?
|
|
757
775
|
html`
|
|
758
776
|
<devtools-report>
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
777
|
+
${renderKeyValue(i18nString(UIStrings.keySite), selectedEvent.site, 'dbsc-event-site')}
|
|
778
|
+
${
|
|
779
|
+
selectedEvent.sessionId &&
|
|
780
|
+
renderKeyValue(i18nString(UIStrings.sessionId), selectedEvent.sessionId, 'dbsc-event-session-id')}
|
|
781
|
+
${renderKeyValue(i18nString(UIStrings.type), getEventTypeString(selectedEvent), 'dbsc-event-type')}
|
|
782
|
+
${
|
|
783
|
+
renderKeyValue(
|
|
784
|
+
i18nString(UIStrings.eventResult), succeededToString(selectedEvent.succeeded), 'dbsc-event-result')}
|
|
767
785
|
${creationEventDetails}
|
|
768
786
|
${refreshEventDetails}
|
|
769
787
|
${challengeEventDetails}
|
|
@@ -870,6 +888,13 @@ export class DeviceBoundSessionsView extends UI.Widget.VBox {
|
|
|
870
888
|
}
|
|
871
889
|
}
|
|
872
890
|
|
|
891
|
+
function renderKeyValue(key: string, value: string, id: string): TemplateResult {
|
|
892
|
+
return html`
|
|
893
|
+
<devtools-report-key id=${id}>${key}</devtools-report-key>
|
|
894
|
+
<devtools-report-value role="text" aria-describedby=${id}>${value}</devtools-report-value>
|
|
895
|
+
`;
|
|
896
|
+
}
|
|
897
|
+
|
|
873
898
|
function ruleTypeToString(ruleType: Protocol.Network.DeviceBoundSessionUrlRuleRuleType): string {
|
|
874
899
|
switch (ruleType) {
|
|
875
900
|
case Protocol.Network.DeviceBoundSessionUrlRuleRuleType.Exclude:
|
|
@@ -38,7 +38,6 @@ import * as Common from '../../core/common/common.js';
|
|
|
38
38
|
import * as Host from '../../core/host/host.js';
|
|
39
39
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
40
40
|
import * as Platform from '../../core/platform/platform.js';
|
|
41
|
-
import * as Root from '../../core/root/root.js';
|
|
42
41
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
43
42
|
import * as Protocol from '../../generated/protocol.js';
|
|
44
43
|
import * as AiAssistanceModel from '../../models/ai_assistance/ai_assistance.js';
|
|
@@ -47,7 +46,6 @@ import type * as IssuesManager from '../../models/issues_manager/issues_manager.
|
|
|
47
46
|
import * as Logs from '../../models/logs/logs.js';
|
|
48
47
|
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
49
48
|
import * as Workspace from '../../models/workspace/workspace.js';
|
|
50
|
-
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
51
49
|
import * as CodeHighlighter from '../../ui/components/code_highlighter/code_highlighter.js';
|
|
52
50
|
import * as Highlighting from '../../ui/components/highlighting/highlighting.js';
|
|
53
51
|
import * as IssueCounter from '../../ui/components/issue_counter/issue_counter.js';
|
|
@@ -61,7 +59,6 @@ import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
|
61
59
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
62
60
|
import {render} from '../../ui/lit/lit.js';
|
|
63
61
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
64
|
-
import * as Security from '../security/security.js';
|
|
65
62
|
|
|
66
63
|
import {format, updateStyle} from './ConsoleFormat.js';
|
|
67
64
|
import {ConsoleInsightTeaser} from './ConsoleInsightTeaser.js';
|
|
@@ -220,10 +217,6 @@ const UIStrings = {
|
|
|
220
217
|
* @description Message to offer insights for a console message
|
|
221
218
|
*/
|
|
222
219
|
explainThisMessageWithAI: 'Understand this message. Powered by AI',
|
|
223
|
-
/**
|
|
224
|
-
* @description Tooltip shown when user hovers over the cookie icon to explain that the button will bring the user to the cookie report
|
|
225
|
-
*/
|
|
226
|
-
SeeIssueInCookieReport: 'Click to open privacy and security panel and show third-party cookie report',
|
|
227
220
|
/**
|
|
228
221
|
* @description Element text content in Object Properties Section
|
|
229
222
|
*/
|
|
@@ -574,23 +567,6 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
574
567
|
return elements;
|
|
575
568
|
}
|
|
576
569
|
|
|
577
|
-
#appendCookieReportButtonToElem(elem: HTMLElement): void {
|
|
578
|
-
const button = new Buttons.Button.Button();
|
|
579
|
-
button.data = {
|
|
580
|
-
size: Buttons.Button.Size.SMALL,
|
|
581
|
-
variant: Buttons.Button.Variant.ICON,
|
|
582
|
-
iconName: 'cookie',
|
|
583
|
-
jslogContext: 'privacy',
|
|
584
|
-
title: i18nString(UIStrings.SeeIssueInCookieReport)
|
|
585
|
-
};
|
|
586
|
-
|
|
587
|
-
button.addEventListener('click', () => {
|
|
588
|
-
void Common.Revealer.reveal(new Security.CookieReportView.CookieReportView());
|
|
589
|
-
});
|
|
590
|
-
|
|
591
|
-
elem.appendChild(button);
|
|
592
|
-
}
|
|
593
|
-
|
|
594
570
|
#getLinkifierMetric(): Host.UserMetrics.Action|undefined {
|
|
595
571
|
const request = Logs.NetworkLog.NetworkLog.requestForConsoleMessage(this.message);
|
|
596
572
|
if (request?.resourceType().isStyleSheet()) {
|
|
@@ -631,14 +607,6 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
631
607
|
return null;
|
|
632
608
|
};
|
|
633
609
|
|
|
634
|
-
if (this.message.isCookieReportIssue && Root.Runtime.hostConfig.devToolsPrivacyUI?.enabled) {
|
|
635
|
-
const anchorWrapperElement = document.createElement('span');
|
|
636
|
-
anchorWrapperElement.classList.add('console-message-anchor', 'cookie-report-anchor');
|
|
637
|
-
this.#appendCookieReportButtonToElem(anchorWrapperElement);
|
|
638
|
-
UI.UIUtils.createTextChild(anchorWrapperElement, ' ');
|
|
639
|
-
return anchorWrapperElement;
|
|
640
|
-
}
|
|
641
|
-
|
|
642
610
|
const anchorElement = linkify(this.message);
|
|
643
611
|
// Append a space to prevent the anchor text from being glued to the console message when the user selects and copies the console messages.
|
|
644
612
|
if (anchorElement) {
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import '../../ui/kit/kit.js';
|
|
6
6
|
|
|
7
7
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
8
|
+
import * as Platform from '../../core/platform/platform.js';
|
|
8
9
|
import type * as Protocol from '../../generated/protocol.js';
|
|
9
10
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
10
11
|
import {Directives, html, render} from '../../ui/lit/lit.js';
|
|
@@ -61,7 +62,8 @@ const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
61
62
|
render(
|
|
62
63
|
html`
|
|
63
64
|
<style>${playerListViewStyles}</style>
|
|
64
|
-
<div class="player-entry-header">${i18nString(UIStrings.players)}</div>
|
|
65
|
+
<div class="player-entry-header" id="players-header">${i18nString(UIStrings.players)}</div>
|
|
66
|
+
<div role="listbox" aria-labelledby="players-header">
|
|
65
67
|
${input.players.map(player => {
|
|
66
68
|
const isSelected = player.playerID === input.selectedPlayerID;
|
|
67
69
|
return html`
|
|
@@ -71,8 +73,17 @@ const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
71
73
|
selected: isSelected,
|
|
72
74
|
'force-white-icons': isSelected,
|
|
73
75
|
})}
|
|
76
|
+
tabindex="0"
|
|
74
77
|
@click=${() => input.onPlayerClick(player.playerID)}
|
|
78
|
+
@keydown=${(e: KeyboardEvent) => {
|
|
79
|
+
if (Platform.KeyboardUtilities.isEnterOrSpaceKey(e)) {
|
|
80
|
+
e.preventDefault();
|
|
81
|
+
input.onPlayerClick(player.playerID);
|
|
82
|
+
}
|
|
83
|
+
}}
|
|
75
84
|
@contextmenu=${(e: Event) => input.onPlayerContextMenu(player.playerID, e)}
|
|
85
|
+
role="option"
|
|
86
|
+
aria-selected=${isSelected}
|
|
76
87
|
jslog=${VisualLogging.item('player').track({click: true})}>
|
|
77
88
|
<div class="player-entry-status-icon vbox">
|
|
78
89
|
<div class="player-entry-status-icon-centering">
|
|
@@ -84,6 +95,7 @@ const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
84
95
|
</div>
|
|
85
96
|
`;
|
|
86
97
|
})}
|
|
98
|
+
</div>
|
|
87
99
|
`,
|
|
88
100
|
target
|
|
89
101
|
);
|
|
@@ -34,6 +34,11 @@ li.storage-group-list-item::before {
|
|
|
34
34
|
background: var(--sys-color-state-hover-on-subtle);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
&:focus-visible {
|
|
38
|
+
outline: var(--sys-size-2) solid var(--sys-color-state-focus-ring);
|
|
39
|
+
outline-offset: calc(var(--sys-size-2) * -1);
|
|
40
|
+
}
|
|
41
|
+
|
|
37
42
|
&.selected {
|
|
38
43
|
background: var(--sys-color-tonal-container);
|
|
39
44
|
color: var(--sys-color-on-tonal-container);
|
|
@@ -345,7 +345,8 @@ export class NetworkItemView extends UI.TabbedPane.TabbedPane {
|
|
|
345
345
|
return;
|
|
346
346
|
}
|
|
347
347
|
if (this.#request.queryParameters || await this.#request.requestFormData()) {
|
|
348
|
-
this.#payloadView = new RequestPayloadView(
|
|
348
|
+
this.#payloadView = new RequestPayloadView();
|
|
349
|
+
this.#payloadView.request = this.#request;
|
|
349
350
|
this.appendTab(
|
|
350
351
|
NetworkForward.UIRequestLocation.UIRequestTabs.PAYLOAD, i18nString(UIStrings.payload), this.#payloadView,
|
|
351
352
|
i18nString(UIStrings.payload), /* userGesture=*/ void 0,
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import * as Common from '../../core/common/common.js';
|
|
7
7
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
8
8
|
import type * as NetworkTimeCalculator from '../../models/network_time_calculator/network_time_calculator.js';
|
|
9
|
+
import * as StackTrace from '../../models/stack_trace/stack_trace.js';
|
|
9
10
|
import {Icon} from '../../ui/kit/kit.js';
|
|
10
11
|
import * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';
|
|
11
12
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
@@ -880,20 +881,30 @@ export class NetworkLogViewColumns {
|
|
|
880
881
|
if (!request) {
|
|
881
882
|
return null;
|
|
882
883
|
}
|
|
884
|
+
let descriptor: Common.EventTarget.EventDescriptor|undefined = undefined;
|
|
883
885
|
return {
|
|
884
886
|
box: anchor.boxInWindow(),
|
|
885
887
|
show: async (popover: UI.GlassPane.GlassPane) => {
|
|
886
|
-
this.popupLinkifier
|
|
887
|
-
popover.setSizeBehavior(UI.GlassPane.SizeBehavior.MEASURE_CONTENT);
|
|
888
|
-
});
|
|
889
|
-
const content = RequestInitiatorView.createStackTracePreview((request), this.popupLinkifier, false);
|
|
888
|
+
const content = await RequestInitiatorView.createStackTracePreview((request), this.popupLinkifier, false);
|
|
890
889
|
if (!content) {
|
|
891
890
|
return false;
|
|
892
891
|
}
|
|
893
|
-
content.
|
|
892
|
+
descriptor = content.stackTrace?.addEventListener(StackTrace.StackTrace.Events.UPDATED, async () => {
|
|
893
|
+
await content.preview.updateComplete;
|
|
894
|
+
popover.setSizeBehavior(UI.GlassPane.SizeBehavior.MEASURE_CONTENT);
|
|
895
|
+
});
|
|
896
|
+
content.preview.show(popover.contentElement);
|
|
897
|
+
await content.preview.updateComplete.then(() => {
|
|
898
|
+
popover.setSizeBehavior(UI.GlassPane.SizeBehavior.MEASURE_CONTENT);
|
|
899
|
+
});
|
|
894
900
|
return true;
|
|
895
901
|
},
|
|
896
|
-
hide:
|
|
902
|
+
hide: () => {
|
|
903
|
+
this.popupLinkifier.reset();
|
|
904
|
+
if (descriptor) {
|
|
905
|
+
Common.EventTarget.removeEventListeners([descriptor]);
|
|
906
|
+
}
|
|
907
|
+
},
|
|
897
908
|
};
|
|
898
909
|
}
|
|
899
910
|
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
7
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
8
|
+
import * as Bindings from '../../models/bindings/bindings.js';
|
|
8
9
|
import * as Logs from '../../models/logs/logs.js';
|
|
10
|
+
import type * as StackTrace from '../../models/stack_trace/stack_trace.js';
|
|
9
11
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
10
12
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
11
13
|
import * as Lit from '../../ui/lit/lit.js';
|
|
@@ -172,17 +174,31 @@ export class RequestInitiatorView extends UI.Widget.VBox {
|
|
|
172
174
|
this.#view = view;
|
|
173
175
|
}
|
|
174
176
|
|
|
175
|
-
static createStackTracePreview(
|
|
177
|
+
static async createStackTracePreview(
|
|
176
178
|
request: SDK.NetworkRequest.NetworkRequest, linkifier: Components.Linkifier.Linkifier,
|
|
177
|
-
focusableLink?: boolean):
|
|
179
|
+
focusableLink?: boolean): Promise<{
|
|
180
|
+
preview: Components.JSPresentationUtils.StackTracePreviewContent,
|
|
181
|
+
stackTrace: StackTrace.StackTrace.StackTrace|null,
|
|
182
|
+
}|null> {
|
|
178
183
|
const initiator = request.initiator();
|
|
179
184
|
if (!initiator?.stack) {
|
|
180
185
|
return null;
|
|
181
186
|
}
|
|
182
187
|
const networkManager = SDK.NetworkManager.NetworkManager.forRequest(request);
|
|
183
188
|
const target = networkManager ? networkManager.target() : undefined;
|
|
184
|
-
|
|
185
|
-
|
|
189
|
+
if (target) {
|
|
190
|
+
const stackTrace = await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()
|
|
191
|
+
.createStackTraceFromProtocolRuntime(initiator.stack, target);
|
|
192
|
+
const preview = new Components.JSPresentationUtils.StackTracePreviewContent(
|
|
193
|
+
undefined, target, linkifier, {tabStops: focusableLink});
|
|
194
|
+
preview.stackTrace = stackTrace;
|
|
195
|
+
return {preview, stackTrace};
|
|
196
|
+
}
|
|
197
|
+
return {
|
|
198
|
+
preview: new Components.JSPresentationUtils.StackTracePreviewContent(
|
|
199
|
+
undefined, target, linkifier, {runtimeStackTrace: initiator.stack, tabStops: focusableLink}),
|
|
200
|
+
stackTrace: null
|
|
201
|
+
};
|
|
186
202
|
}
|
|
187
203
|
|
|
188
204
|
override performUpdate(): void {
|