chrome-devtools-frontend 1.0.1643855 → 1.0.1646286
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/devtools-source-maps/SKILL.md +124 -0
- package/docs/README.md +1 -0
- package/docs/using_source_maps.md +159 -0
- package/front_end/core/host/AidaClientTypes.ts +2 -0
- package/front_end/core/host/UserMetrics.ts +5 -3
- package/front_end/core/root/Runtime.ts +10 -0
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +2 -3
- package/front_end/core/sdk/DebuggerModel.ts +7 -9
- package/front_end/core/sdk/NetworkRequest.ts +0 -25
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +37 -0
- package/front_end/generated/InspectorBackendCommands.ts +2 -2
- package/front_end/generated/SupportedCSSProperties.js +79 -2
- package/front_end/generated/protocol.ts +0 -5
- package/front_end/models/ai_assistance/AiAgent2.ts +52 -15
- package/front_end/models/ai_assistance/AiConversation.ts +4 -2
- package/front_end/models/ai_assistance/AiOrigins.ts +63 -2
- package/front_end/models/ai_assistance/README.md +20 -8
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +2 -2
- package/front_end/models/ai_assistance/agents/FileAgent.ts +9 -42
- package/front_end/models/ai_assistance/agents/NetworkAgent.snapshot.txt +2 -2
- package/front_end/models/ai_assistance/agents/NetworkAgent.ts +9 -133
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +25 -2
- package/front_end/models/ai_assistance/agents/README.md +64 -0
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +26 -3
- package/front_end/models/ai_assistance/ai_assistance.ts +4 -0
- package/front_end/models/ai_assistance/contexts/FileContext.ts +45 -0
- package/front_end/models/ai_assistance/contexts/RequestContext.snapshot.txt +48 -0
- package/front_end/models/ai_assistance/contexts/RequestContext.ts +116 -0
- package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +2 -1
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +9 -12
- package/front_end/models/ai_assistance/tools/GetStyles.ts +19 -12
- package/front_end/models/ai_assistance/tools/README.md +45 -0
- package/front_end/models/ai_assistance/tools/Tool.ts +74 -11
- package/front_end/models/ai_assistance/tools/ToolRegistry.ts +21 -5
- package/front_end/models/heap_snapshot/HeapSnapshotModel.ts +18 -2
- package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +4 -0
- package/front_end/models/stack_trace/DetailedErrorStackParser.ts +17 -4
- package/front_end/models/stack_trace/StackTraceModel.ts +34 -1
- package/front_end/models/trace/Styles.ts +29 -7
- package/front_end/models/trace/handlers/NetworkRequestsHandler.ts +15 -11
- package/front_end/models/trace/handlers/PageLoadMetricsHandler.ts +33 -4
- package/front_end/models/trace/helpers/Timing.ts +10 -0
- package/front_end/models/trace/types/TraceEvents.ts +22 -2
- package/front_end/models/web_mcp/WebMCPModel.ts +8 -48
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +21 -15
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +16 -0
- package/front_end/panels/ai_assistance/components/ChatInput.ts +4 -4
- package/front_end/panels/application/ApplicationPanelSidebar.ts +69 -0
- package/front_end/panels/application/ServiceWorkersView.ts +2 -2
- package/front_end/panels/application/WebMCPView.ts +40 -71
- package/front_end/panels/application/components/AdsView.ts +31 -28
- package/front_end/panels/application/components/BackForwardCacheView.ts +1 -2
- package/front_end/panels/application/components/adsView.css +6 -0
- package/front_end/panels/common/ExtensionServer.ts +5 -0
- package/front_end/panels/console/ConsoleView.ts +6 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +46 -213
- package/front_end/panels/console/SymbolizedErrorWidget.ts +4 -1
- package/front_end/panels/elements/AdoptedStyleSheetTreeElement.ts +0 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +0 -2
- package/front_end/panels/elements/PropertyRenderer.ts +0 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +9 -2
- package/front_end/panels/issues/AffectedResourcesView.ts +1 -1
- package/front_end/panels/issues/AffectedSourcesView.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +0 -1
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +10 -0
- package/front_end/panels/network/NetworkDataGridNode.ts +1 -2
- package/front_end/panels/network/NetworkLogView.ts +34 -7
- package/front_end/panels/profiler/HeapProfileView.ts +0 -1
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +0 -1
- package/front_end/panels/profiler/HeapSnapshotView.ts +1 -1
- package/front_end/panels/profiler/IsolateSelector.ts +4 -2
- package/front_end/panels/profiler/ProfileLauncherView.ts +194 -126
- package/front_end/panels/profiler/ProfilesPanel.ts +1 -3
- package/front_end/panels/settings/components/SyncSection.ts +1 -1
- package/front_end/panels/timeline/TimelineFlameChartView.ts +5 -4
- package/front_end/panels/timeline/TimelinePanel.ts +7 -0
- package/front_end/panels/timeline/TimelineUIUtils.ts +13 -14
- package/front_end/panels/timeline/TimingsTrackAppender.ts +7 -5
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +0 -1
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +0 -2
- package/front_end/panels/timeline/components/insights/ForcedReflow.ts +0 -1
- package/front_end/panels/timeline/components/insights/NodeLink.ts +0 -1
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +2 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/helpers/OpenInNewTab.ts +3 -3
- package/front_end/ui/kit/link/Link.ts +16 -2
- package/front_end/ui/legacy/InspectorDrawerView.ts +14 -5
- package/front_end/ui/legacy/InspectorView.ts +4 -1
- package/front_end/ui/legacy/PlusButton.ts +6 -1
- package/front_end/ui/legacy/Widget.ts +19 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +95 -31
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +0 -1
- package/front_end/ui/legacy/components/utils/Linkifier.ts +2 -16
- package/front_end/ui/visual_logging/KnownContextValues.ts +6 -0
- package/package.json +1 -1
|
@@ -228,8 +228,8 @@ export class ServiceWorkersView extends UI.Widget.VBox implements
|
|
|
228
228
|
othersView.show(othersDiv);
|
|
229
229
|
const othersSection = othersView.appendSection(i18nString(UIStrings.serviceWorkersFromOtherOrigins));
|
|
230
230
|
const othersSectionRow = othersSection.appendRow();
|
|
231
|
-
const seeOthers = Link.create(
|
|
232
|
-
|
|
231
|
+
const seeOthers = Link.create('chrome://serviceworker-internals', i18nString(UIStrings.seeAllRegistrations),
|
|
232
|
+
undefined, 'view-all', 0, /* allowPrivileged=*/ true);
|
|
233
233
|
othersSectionRow.appendChild(seeOthers);
|
|
234
234
|
|
|
235
235
|
this.toolbar.appendToolbarItem(
|
|
@@ -16,6 +16,7 @@ import * as i18n from '../../core/i18n/i18n.js';
|
|
|
16
16
|
import * as Platform from '../../core/platform/platform.js';
|
|
17
17
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
18
18
|
import * as Protocol from '../../generated/protocol.js';
|
|
19
|
+
import type * as Bindings from '../../models/bindings/bindings.js';
|
|
19
20
|
import type * as StackTrace from '../../models/stack_trace/stack_trace.js';
|
|
20
21
|
import * as WebMCP from '../../models/web_mcp/web_mcp.js';
|
|
21
22
|
import * as Adorners from '../../ui/components/adorners/adorners.js';
|
|
@@ -33,6 +34,8 @@ import {
|
|
|
33
34
|
type TemplateResult,
|
|
34
35
|
} from '../../ui/lit/lit.js';
|
|
35
36
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
37
|
+
import * as Console from '../console/console.js';
|
|
38
|
+
import symbolizedErrorWidgetStyles from '../console/symbolizedErrorWidget.css.js';
|
|
36
39
|
import * as ProtocolMonitor from '../protocol_monitor/protocol_monitor.js';
|
|
37
40
|
|
|
38
41
|
import webMCPViewStyles from './webMCPView.css.js';
|
|
@@ -191,10 +194,6 @@ const UIStrings = {
|
|
|
191
194
|
* @description Notice to display when a tool has been unregistered
|
|
192
195
|
*/
|
|
193
196
|
toolUnregisteredNotice: 'This tool has been unregistered',
|
|
194
|
-
/**
|
|
195
|
-
* @description Text preceding a nested error in a stack trace
|
|
196
|
-
*/
|
|
197
|
-
causedBy: 'Caused by:',
|
|
198
197
|
} as const;
|
|
199
198
|
const str_ = i18n.i18n.registerUIStrings('panels/application/WebMCPView.ts', UIStrings);
|
|
200
199
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
@@ -592,7 +591,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
592
591
|
${widget(PayloadWidget, {
|
|
593
592
|
valueObject: input.selectedCall?.result?.output,
|
|
594
593
|
errorText: input.selectedCall?.result?.errorText,
|
|
595
|
-
|
|
594
|
+
symbolizedError: input.selectedCall?.result?.symbolizedError,
|
|
596
595
|
})}>
|
|
597
596
|
</devtools-widget>
|
|
598
597
|
</devtools-tabbed-pane>
|
|
@@ -953,11 +952,11 @@ export interface PayloadViewInput {
|
|
|
953
952
|
valueObject?: unknown;
|
|
954
953
|
valueString?: string;
|
|
955
954
|
errorText?: string;
|
|
956
|
-
|
|
955
|
+
symbolizedError?: Bindings.SymbolizedError.SymbolizedError|null;
|
|
957
956
|
}
|
|
958
957
|
|
|
959
958
|
export const PAYLOAD_DEFAULT_VIEW = (input: PayloadViewInput, output: object, target: HTMLElement): void => {
|
|
960
|
-
if (!input.valueObject && !input.valueString && !input.errorText && !input.
|
|
959
|
+
if (!input.valueObject && !input.valueString && !input.errorText && !input.symbolizedError) {
|
|
961
960
|
render(nothing, target);
|
|
962
961
|
return;
|
|
963
962
|
}
|
|
@@ -988,74 +987,44 @@ export const PAYLOAD_DEFAULT_VIEW = (input: PayloadViewInput, output: object, ta
|
|
|
988
987
|
html`<div class="payload-value source-code error-text">${text}</div>`;
|
|
989
988
|
|
|
990
989
|
const createException = (
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
index: number,
|
|
997
|
-
array: StackTrace.ErrorStackParser.ParsedErrorFrame[],
|
|
998
|
-
): TemplateResult => {
|
|
999
|
-
const newline = index < array.length - 1 ? '\n' : '';
|
|
1000
|
-
const {line, link, isCallFrame} = frame;
|
|
1001
|
-
|
|
1002
|
-
if (!isCallFrame) {
|
|
1003
|
-
return html`<span>${line}${newline}</span>`;
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
if (!link) {
|
|
1007
|
-
return html`<span class="formatted-builtin-stack-frame">${line}${newline}</span>`;
|
|
1008
|
-
}
|
|
1009
|
-
|
|
1010
|
-
const scriptLocationLink = linkifier.linkifyScriptLocation(
|
|
1011
|
-
details.error.runtimeModel().target(),
|
|
1012
|
-
link.scriptId || null,
|
|
1013
|
-
link.url,
|
|
1014
|
-
link.lineNumber,
|
|
1015
|
-
{
|
|
1016
|
-
columnNumber: link.columnNumber,
|
|
1017
|
-
inlineFrameIndex: 0,
|
|
1018
|
-
showColumnNumber: true,
|
|
1019
|
-
},
|
|
1020
|
-
);
|
|
1021
|
-
scriptLocationLink.tabIndex = -1;
|
|
1022
|
-
|
|
1023
|
-
return html`<span class="formatted-stack-frame">${link.prefix}${scriptLocationLink}${link.suffix}${
|
|
1024
|
-
newline}</span>`;
|
|
1025
|
-
};
|
|
1026
|
-
|
|
990
|
+
error: Bindings.SymbolizedError.SymbolizedError|null,
|
|
991
|
+
): TemplateResult|typeof nothing => {
|
|
992
|
+
if (!error) {
|
|
993
|
+
return nothing;
|
|
994
|
+
}
|
|
1027
995
|
return html`
|
|
1028
996
|
<div class="payload-value source-code error-text">
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
997
|
+
<devtools-widget
|
|
998
|
+
${UI.Widget.widget(Console.SymbolizedErrorWidget.SymbolizedErrorWidget, {error})}
|
|
999
|
+
></devtools-widget>
|
|
1000
|
+
</div>
|
|
1001
|
+
`;
|
|
1034
1002
|
};
|
|
1035
1003
|
|
|
1036
|
-
render(
|
|
1037
|
-
html`
|
|
1004
|
+
render(html`
|
|
1038
1005
|
<style>${webMCPViewStyles}</style>
|
|
1006
|
+
<style>${symbolizedErrorWidgetStyles}</style>
|
|
1039
1007
|
<div class="call-payload-view">
|
|
1040
1008
|
<div class="call-payload-content">
|
|
1041
1009
|
${
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1010
|
+
isParsable ?
|
|
1011
|
+
createPayload(input.valueObject) :
|
|
1012
|
+
(input.valueString !== undefined ?
|
|
1013
|
+
createSourceText(input.valueString) :
|
|
1014
|
+
(input.symbolizedError ? createException(input.symbolizedError) :
|
|
1015
|
+
(input.errorText ? createErrorText(input.errorText) : nothing)))}
|
|
1047
1016
|
</div>
|
|
1048
1017
|
</div>
|
|
1049
1018
|
`,
|
|
1050
|
-
|
|
1019
|
+
target);
|
|
1051
1020
|
};
|
|
1052
1021
|
|
|
1053
1022
|
export class PayloadWidget extends UI.Widget.Widget {
|
|
1054
1023
|
#valueObject?: unknown;
|
|
1055
1024
|
#valueString?: string;
|
|
1056
1025
|
#errorText?: string;
|
|
1057
|
-
#
|
|
1058
|
-
#
|
|
1026
|
+
#symbolizedErrorPromise?: Promise<Bindings.SymbolizedError.SymbolizedError|null>;
|
|
1027
|
+
#symbolizedError?: Bindings.SymbolizedError.SymbolizedError|null;
|
|
1059
1028
|
#view: typeof PAYLOAD_DEFAULT_VIEW;
|
|
1060
1029
|
|
|
1061
1030
|
constructor(element?: HTMLElement, view = PAYLOAD_DEFAULT_VIEW) {
|
|
@@ -1090,27 +1059,27 @@ export class PayloadWidget extends UI.Widget.Widget {
|
|
|
1090
1059
|
return this.#errorText;
|
|
1091
1060
|
}
|
|
1092
1061
|
|
|
1093
|
-
async #
|
|
1094
|
-
|
|
1095
|
-
if (this.#
|
|
1062
|
+
async #updateSymbolizedError(symbolizedErrorPromise: Promise<Bindings.SymbolizedError.SymbolizedError|null>|
|
|
1063
|
+
undefined): Promise<void> {
|
|
1064
|
+
if (this.#symbolizedErrorPromise === symbolizedErrorPromise) {
|
|
1096
1065
|
return;
|
|
1097
1066
|
}
|
|
1098
|
-
this.#
|
|
1099
|
-
this.#
|
|
1067
|
+
this.#symbolizedErrorPromise = symbolizedErrorPromise;
|
|
1068
|
+
this.#symbolizedError = undefined;
|
|
1100
1069
|
this.requestUpdate();
|
|
1101
|
-
const
|
|
1102
|
-
if (this.#
|
|
1103
|
-
this.#
|
|
1070
|
+
const symbolizedError = await symbolizedErrorPromise;
|
|
1071
|
+
if (this.#symbolizedErrorPromise === symbolizedErrorPromise) {
|
|
1072
|
+
this.#symbolizedError = symbolizedError || null;
|
|
1104
1073
|
this.requestUpdate();
|
|
1105
1074
|
}
|
|
1106
1075
|
}
|
|
1107
1076
|
|
|
1108
|
-
set
|
|
1109
|
-
void this.#
|
|
1077
|
+
set symbolizedError(symbolizedErrorPromise: Promise<Bindings.SymbolizedError.SymbolizedError|null>|undefined) {
|
|
1078
|
+
void this.#updateSymbolizedError(symbolizedErrorPromise);
|
|
1110
1079
|
}
|
|
1111
1080
|
|
|
1112
|
-
get
|
|
1113
|
-
return this.#
|
|
1081
|
+
get symbolizedError(): Promise<Bindings.SymbolizedError.SymbolizedError|null>|undefined {
|
|
1082
|
+
return this.#symbolizedErrorPromise;
|
|
1114
1083
|
}
|
|
1115
1084
|
override wasShown(): void {
|
|
1116
1085
|
super.wasShown();
|
|
@@ -1122,7 +1091,7 @@ export class PayloadWidget extends UI.Widget.Widget {
|
|
|
1122
1091
|
valueObject: this.#valueObject,
|
|
1123
1092
|
valueString: this.#valueString,
|
|
1124
1093
|
errorText: this.#errorText,
|
|
1125
|
-
|
|
1094
|
+
symbolizedError: this.#symbolizedError,
|
|
1126
1095
|
};
|
|
1127
1096
|
this.#view(input, {}, this.contentElement);
|
|
1128
1097
|
}
|
|
@@ -7,6 +7,7 @@ import * as SDK from '../../../core/sdk/sdk.js';
|
|
|
7
7
|
import type * as Protocol from '../../../generated/protocol.js';
|
|
8
8
|
import * as UI from '../../../ui/legacy/legacy.js';
|
|
9
9
|
import * as Lit from '../../../ui/lit/lit.js';
|
|
10
|
+
import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
|
|
10
11
|
|
|
11
12
|
import adsViewStyles from './adsView.css.js';
|
|
12
13
|
|
|
@@ -89,34 +90,36 @@ const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
89
90
|
// clang-format off
|
|
90
91
|
Lit.render(html`
|
|
91
92
|
<style>${adsViewStyles}</style>
|
|
92
|
-
<
|
|
93
|
-
<
|
|
94
|
-
<
|
|
95
|
-
|
|
96
|
-
<
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
<
|
|
102
|
-
|
|
103
|
-
<
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
<
|
|
109
|
-
|
|
110
|
-
<
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
<
|
|
115
|
-
|
|
116
|
-
<
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
93
|
+
<div class="ads-view-container" jslog=${VisualLogging.pane('ads')}>
|
|
94
|
+
<dl class="metrics-container">
|
|
95
|
+
<div class="metric-box">
|
|
96
|
+
<dt class="metric-title">${i18nString(UIStrings.viewportAdDensity)}</dt>
|
|
97
|
+
<dd class="metric-value">
|
|
98
|
+
<span>${formatValue(metrics.viewportAdDensityByArea, true)}</span>
|
|
99
|
+
<span class="metric-average">${i18nString(UIStrings.average, {PH1: formatAverage(metrics.averageViewportAdDensityByArea, true)})}</span>
|
|
100
|
+
</dd>
|
|
101
|
+
</div>
|
|
102
|
+
<div class="metric-box">
|
|
103
|
+
<dt class="metric-title">${i18nString(UIStrings.viewportAdCount)}</dt>
|
|
104
|
+
<dd class="metric-value">
|
|
105
|
+
<span>${formatValue(metrics.viewportAdCount, false)}</span>
|
|
106
|
+
<span class="metric-average">${i18nString(UIStrings.average, {PH1: formatAverage(metrics.averageViewportAdCount, false)})}</span>
|
|
107
|
+
</dd>
|
|
108
|
+
</div>
|
|
109
|
+
<div class="metric-box">
|
|
110
|
+
<dt class="metric-title">${i18nString(UIStrings.totalCpuUsage)}</dt>
|
|
111
|
+
<dd class="metric-value">
|
|
112
|
+
<span>${formatCpu(metrics.totalAdCpuTime)}</span>
|
|
113
|
+
</dd>
|
|
114
|
+
</div>
|
|
115
|
+
<div class="metric-box">
|
|
116
|
+
<dt class="metric-title">${i18nString(UIStrings.totalNetworkUsage)}</dt>
|
|
117
|
+
<dd class="metric-value">
|
|
118
|
+
<span>${formatNetwork(metrics.totalAdNetworkBytes)}</span>
|
|
119
|
+
</dd>
|
|
120
|
+
</div>
|
|
121
|
+
</dl>
|
|
122
|
+
</div>
|
|
120
123
|
`, target);
|
|
121
124
|
// clang-format on
|
|
122
125
|
};
|
|
@@ -341,7 +341,7 @@ function maybeRenderReasonContext(explanation: Protocol.Page.BackForwardCacheNot
|
|
|
341
341
|
const link = 'chrome://extensions/?id=' + explanation.context as Platform.DevToolsPath.UrlString;
|
|
342
342
|
// clang-format off
|
|
343
343
|
return html`${i18nString(UIStrings.blockingExtensionId)}
|
|
344
|
-
<devtools-link .href=${link}>${explanation.context}</devtools-link>`;
|
|
344
|
+
<devtools-link .href=${link} allow-privileged>${explanation.context}</devtools-link>`;
|
|
345
345
|
// clang-format on
|
|
346
346
|
}
|
|
347
347
|
return nothing;
|
|
@@ -393,7 +393,6 @@ function maybeRenderJavaScriptDetails(details: Protocol.Page.BackForwardCacheBlo
|
|
|
393
393
|
options: {
|
|
394
394
|
columnNumber: detail.columnNumber,
|
|
395
395
|
showColumnNumber: true,
|
|
396
|
-
inlineFrameIndex: 0,
|
|
397
396
|
maxLength: maxLengthForDisplayedURLs,
|
|
398
397
|
}
|
|
399
398
|
})}`));
|
|
@@ -12,6 +12,7 @@ import * as Host from '../../core/host/host.js';
|
|
|
12
12
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
13
13
|
import * as Platform from '../../core/platform/platform.js';
|
|
14
14
|
import * as _ProtocolClient from '../../core/protocol_client/protocol_client.js'; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
15
|
+
import * as Root from '../../core/root/root.js';
|
|
15
16
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
16
17
|
import type * as Protocol from '../../generated/protocol.js';
|
|
17
18
|
import * as Bindings from '../../models/bindings/bindings.js';
|
|
@@ -1616,6 +1617,10 @@ export class ExtensionServer extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
1616
1617
|
targetType = Host.UserMetrics.ExtensionEvalTarget.SAME_EXTENSION;
|
|
1617
1618
|
} else {
|
|
1618
1619
|
targetType = Host.UserMetrics.ExtensionEvalTarget.OTHER_EXTENSION;
|
|
1620
|
+
if (!Root.Runtime.hostConfig.extensionsOnChromeUrls?.enabled) {
|
|
1621
|
+
return this.status.E_FAILED(
|
|
1622
|
+
'Access to extension URLs is restricted; use --extensions-on-chrome-urls to enable.');
|
|
1623
|
+
}
|
|
1619
1624
|
}
|
|
1620
1625
|
}
|
|
1621
1626
|
Host.userMetrics.extensionEvalTarget(targetType);
|
|
@@ -75,6 +75,7 @@ import {
|
|
|
75
75
|
getMessageForElement,
|
|
76
76
|
} from './ConsoleViewMessage.js';
|
|
77
77
|
import {ConsoleViewport, type ConsoleViewportElement, type ConsoleViewportProvider} from './ConsoleViewport.js';
|
|
78
|
+
import symbolizedErrorWidgetStyles from './symbolizedErrorWidget.css.js';
|
|
78
79
|
|
|
79
80
|
const UIStrings = {
|
|
80
81
|
/**
|
|
@@ -356,7 +357,11 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
|
356
357
|
constructor(viewportThrottlerTimeout: number) {
|
|
357
358
|
super();
|
|
358
359
|
this.setMinimumSize(0, 35);
|
|
359
|
-
|
|
360
|
+
// We register the SymbolizedErrorWidget styles here because many web and e2e
|
|
361
|
+
// tests use `deepTextContent`, which would also include <style> tags if they
|
|
362
|
+
// were injected directly into the widget's shadow DOM.
|
|
363
|
+
this.registerRequiredCSS(consoleViewStyles, symbolizedErrorWidgetStyles, objectValueStyles,
|
|
364
|
+
CodeHighlighter.codeHighlighterStyles);
|
|
360
365
|
|
|
361
366
|
this.#searchableView = new UI.SearchableView.SearchableView(this, null);
|
|
362
367
|
this.#searchableView.element.classList.add('console-searchable-view');
|