chrome-devtools-frontend 1.0.1033423 → 1.0.1033742
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/gni/devtools_grd_files.gni +5 -0
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +30 -4
- package/front_end/models/issues_manager/CookieIssue.ts +14 -0
- package/front_end/models/issues_manager/descriptions/arSourceAndTriggerHeaders.md +9 -0
- package/front_end/models/issues_manager/descriptions/arSourceIgnored.md +13 -0
- package/front_end/models/issues_manager/descriptions/arTriggerIgnored.md +12 -0
- package/front_end/models/issues_manager/descriptions/cookieExcludeDomainNonAscii.md +11 -0
- package/front_end/models/issues_manager/descriptions/cookieWarnDomainNonAscii.md +11 -0
- package/front_end/panels/console/ConsolePinPane.ts +2 -2
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +10 -0
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +17 -1
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +1 -0
- package/front_end/ui/legacy/components/object_ui/JavaScriptREPL.ts +2 -2
- package/package.json +1 -1
@@ -286,9 +286,14 @@ grd_files_release_sources = [
|
|
286
286
|
"front_end/models/issues_manager/descriptions/arInvalidRegisterSourceHeader.md",
|
287
287
|
"front_end/models/issues_manager/descriptions/arInvalidRegisterTriggerHeader.md",
|
288
288
|
"front_end/models/issues_manager/descriptions/arPermissionPolicyDisabled.md",
|
289
|
+
"front_end/models/issues_manager/descriptions/arSourceAndTriggerHeaders.md",
|
290
|
+
"front_end/models/issues_manager/descriptions/arSourceIgnored.md",
|
291
|
+
"front_end/models/issues_manager/descriptions/arTriggerIgnored.md",
|
289
292
|
"front_end/models/issues_manager/descriptions/arUntrustworthyReportingOrigin.md",
|
290
293
|
"front_end/models/issues_manager/descriptions/clientHintMetaTagAllowListInvalidOrigin.md",
|
291
294
|
"front_end/models/issues_manager/descriptions/clientHintMetaTagModifiedHTML.md",
|
295
|
+
"front_end/models/issues_manager/descriptions/cookieExcludeDomainNonAscii.md",
|
296
|
+
"front_end/models/issues_manager/descriptions/cookieWarnDomainNonAscii.md",
|
292
297
|
"front_end/models/issues_manager/descriptions/corsAllowCredentialsRequired.md",
|
293
298
|
"front_end/models/issues_manager/descriptions/corsDisabledScheme.md",
|
294
299
|
"front_end/models/issues_manager/descriptions/corsDisallowedByMode.md",
|
@@ -16,6 +16,9 @@ export const enum IssueCode {
|
|
16
16
|
InvalidRegisterTriggerHeader = 'AttributionReportingIssue::InvalidRegisterTriggerHeader',
|
17
17
|
InvalidEligibleHeader = 'AttributionReportingIssue::InvalidEligibleHeader',
|
18
18
|
TooManyConcurrentRequests = 'AttributionReportingIssue::TooManyConcurrentRequests',
|
19
|
+
SourceAndTriggerHeaders = 'AttributionReportingIssue::SourceAndTriggerHeaders',
|
20
|
+
SourceIgnored = 'AttributionReportingIssue::SourceIgnored',
|
21
|
+
TriggerIgnored = 'AttributionReportingIssue::TriggerIgnored',
|
19
22
|
// TODO(apaseltiner): Remove this once old issue types are removed from
|
20
23
|
// protocol.
|
21
24
|
Unknown = 'AttributionReportingIssue::Unknown',
|
@@ -37,11 +40,22 @@ function getIssueCode(details: Protocol.Audits.AttributionReportingIssueDetails)
|
|
37
40
|
return IssueCode.InvalidEligibleHeader;
|
38
41
|
case Protocol.Audits.AttributionReportingIssueType.TooManyConcurrentRequests:
|
39
42
|
return IssueCode.TooManyConcurrentRequests;
|
43
|
+
case Protocol.Audits.AttributionReportingIssueType.SourceAndTriggerHeaders:
|
44
|
+
return IssueCode.SourceAndTriggerHeaders;
|
45
|
+
case Protocol.Audits.AttributionReportingIssueType.SourceIgnored:
|
46
|
+
return IssueCode.SourceIgnored;
|
47
|
+
case Protocol.Audits.AttributionReportingIssueType.TriggerIgnored:
|
48
|
+
return IssueCode.TriggerIgnored;
|
40
49
|
default:
|
41
50
|
return IssueCode.Unknown;
|
42
51
|
}
|
43
52
|
}
|
44
53
|
|
54
|
+
const structuredHeaderLink = {
|
55
|
+
link: 'https://tools.ietf.org/id/draft-ietf-httpbis-header-structure-15.html#rfc.section.4.2.2',
|
56
|
+
linkTitle: 'Structured Headers RFC',
|
57
|
+
};
|
58
|
+
|
45
59
|
export class AttributionReportingIssue extends Issue<IssueCode> {
|
46
60
|
issueDetails: Readonly<Protocol.Audits.AttributionReportingIssueDetails>;
|
47
61
|
|
@@ -85,16 +99,28 @@ export class AttributionReportingIssue extends Issue<IssueCode> {
|
|
85
99
|
case IssueCode.InvalidEligibleHeader:
|
86
100
|
return {
|
87
101
|
file: 'arInvalidEligibleHeader.md',
|
88
|
-
links: [
|
89
|
-
link: 'https://tools.ietf.org/id/draft-ietf-httpbis-header-structure-15.html#rfc.section.4.2.2',
|
90
|
-
linkTitle: 'Structured Headers RFC',
|
91
|
-
}],
|
102
|
+
links: [structuredHeaderLink],
|
92
103
|
};
|
93
104
|
case IssueCode.TooManyConcurrentRequests:
|
94
105
|
return {
|
95
106
|
file: 'arTooManyConcurrentRequests.md',
|
96
107
|
links: [],
|
97
108
|
};
|
109
|
+
case IssueCode.SourceAndTriggerHeaders:
|
110
|
+
return {
|
111
|
+
file: 'arSourceAndTriggerHeaders.md',
|
112
|
+
links: [],
|
113
|
+
};
|
114
|
+
case IssueCode.SourceIgnored:
|
115
|
+
return {
|
116
|
+
file: 'arSourceIgnored.md',
|
117
|
+
links: [structuredHeaderLink],
|
118
|
+
};
|
119
|
+
case IssueCode.TriggerIgnored:
|
120
|
+
return {
|
121
|
+
file: 'arTriggerIgnored.md',
|
122
|
+
links: [structuredHeaderLink],
|
123
|
+
};
|
98
124
|
case IssueCode.Unknown:
|
99
125
|
return null;
|
100
126
|
}
|
@@ -435,6 +435,16 @@ const attributeValueExceedsMaxSize: LazyMarkdownIssueDescription = {
|
|
435
435
|
links: [],
|
436
436
|
};
|
437
437
|
|
438
|
+
const warnDomainNonAscii: LazyMarkdownIssueDescription = {
|
439
|
+
file: 'cookieWarnDomainNonAscii.md',
|
440
|
+
links: [],
|
441
|
+
};
|
442
|
+
|
443
|
+
const excludeDomainNonAscii: LazyMarkdownIssueDescription = {
|
444
|
+
file: 'cookieExcludeDomainNonAscii.md',
|
445
|
+
links: [],
|
446
|
+
};
|
447
|
+
|
438
448
|
const issueDescriptions: Map<string, LazyMarkdownIssueDescription> = new Map([
|
439
449
|
['CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::ReadCookie', sameSiteUnspecifiedErrorRead],
|
440
450
|
['CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::SetCookie', sameSiteUnspecifiedErrorSet],
|
@@ -466,4 +476,8 @@ const issueDescriptions: Map<string, LazyMarkdownIssueDescription> = new Map([
|
|
466
476
|
['CookieIssue::ExcludeSamePartyCrossPartyContext::SetCookie', samePartyCrossPartyContextSet],
|
467
477
|
['CookieIssue::WarnAttributeValueExceedsMaxSize::ReadCookie', attributeValueExceedsMaxSize],
|
468
478
|
['CookieIssue::WarnAttributeValueExceedsMaxSize::SetCookie', attributeValueExceedsMaxSize],
|
479
|
+
['CookieIssue::WarnDomainNonASCII::ReadCookie', warnDomainNonAscii],
|
480
|
+
['CookieIssue::WarnDomainNonASCII::SetCookie', warnDomainNonAscii],
|
481
|
+
['CookieIssue::ExcludeDomainNonASCII::ReadCookie', excludeDomainNonAscii],
|
482
|
+
['CookieIssue::ExcludeDomainNonASCII::SetCookie', excludeDomainNonAscii],
|
469
483
|
]);
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# Ensure that attribution responses contain either source or trigger, not both
|
2
|
+
|
3
|
+
This page tried to register a source and a trigger in the same HTTP response
|
4
|
+
using the Attribution Reporting API, which is prohibited.
|
5
|
+
|
6
|
+
The corresponding request was eligible to register either a source or a
|
7
|
+
trigger, but the response may only set either the
|
8
|
+
`Attribution-Reporting-Register-Source` header or the
|
9
|
+
`Attribution-Reporting-Register-Trigger` header, not both.
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# An attribution source registration was ignored because the request was ineligible
|
2
|
+
|
3
|
+
This page tried to register a source using the Attribution Reporting API, but
|
4
|
+
the request was ineligible to do so, so the source registration was ignored.
|
5
|
+
|
6
|
+
A request is eligible for source registration if it has an
|
7
|
+
`Attribution-Reporting-Eligible` header whose value is a structured dictionary
|
8
|
+
that contains the key `navigation-source` or `event-source`. If the header is
|
9
|
+
absent or does not contain one of those keys, any
|
10
|
+
`Attribution-Reporting-Register-Source` response header will be ignored.
|
11
|
+
|
12
|
+
Additionally, a single HTTP redirect chain may register only all sources or all
|
13
|
+
triggers, not a combination of both.
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# An attribution trigger registration was ignored because the request was ineligible
|
2
|
+
|
3
|
+
This page tried to register a trigger using the Attribution Reporting API, but
|
4
|
+
the request was ineligible to do so, so the trigger registration was ignored.
|
5
|
+
|
6
|
+
A request is eligible for trigger registration if it has an
|
7
|
+
`Attribution-Reporting-Eligible` header whose value is a structured dictionary
|
8
|
+
that contains the key `trigger`, or if the header is absent. Otherwise, any
|
9
|
+
`Attribution-Reporting-Register-Trigger` response header will be ignored.
|
10
|
+
|
11
|
+
Additionally, a single HTTP redirect chain may register only all sources or all
|
12
|
+
triggers, not a combination of both.
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Ensure cookie `Domain` attribute values only contain ASCII characters
|
2
|
+
|
3
|
+
`Domain` attributes in cookies are restricted to the ASCII character set. Any
|
4
|
+
cookies that contain characters outside of the ASCII range in their `Domain`
|
5
|
+
attribute will be ignored.
|
6
|
+
|
7
|
+
To resolve this issue, you need to remove all non-ASCII characters from the
|
8
|
+
`Domain` attribute of the affected cookies.
|
9
|
+
|
10
|
+
If your site has an internationalized domain name (IDN), you should use
|
11
|
+
[punycode](punycodeReference) representation for the `Domain` attribute instead.
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Ensure cookie `Domain` attribute values only contain ASCII characters
|
2
|
+
|
3
|
+
`Domain` attributes in cookies are restricted to the ASCII character set. Any
|
4
|
+
cookies that contain characters outside of the ASCII range in their `Domain`
|
5
|
+
attribute will be ignored in the future.
|
6
|
+
|
7
|
+
To resolve this issue, you need to remove all non-ASCII characters from the
|
8
|
+
`Domain` attribute of the affected cookies.
|
9
|
+
|
10
|
+
If your site has an internationalized domain name (IDN), you should use
|
11
|
+
[punycode](punycodeReference) representation for the `Domain` attribute instead.
|
@@ -329,8 +329,8 @@ export class ConsolePin {
|
|
329
329
|
const executionContext = UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext);
|
330
330
|
const preprocessedExpression = ObjectUI.JavaScriptREPL.JavaScriptREPL.preprocessExpression(text);
|
331
331
|
const {preview, result} = await ObjectUI.JavaScriptREPL.JavaScriptREPL.evaluateAndBuildPreview(
|
332
|
-
preprocessedExpression, throwOnSideEffect,
|
333
|
-
'console', true /* awaitPromise */);
|
332
|
+
preprocessedExpression, throwOnSideEffect, true /* replMode */, timeout, !isEditing /* allowErrors */,
|
333
|
+
'console', true /* awaitPromise */, true /* silent */);
|
334
334
|
if (this.lastResult && this.lastExecutionContext) {
|
335
335
|
this.lastExecutionContext.runtimeModel.releaseEvaluationResult(this.lastResult);
|
336
336
|
}
|
@@ -62,6 +62,8 @@ export class AttributionReportingIssueDetailsView extends AffectedResourcesView
|
|
62
62
|
case IssuesManager.AttributionReportingIssue.IssueCode.InvalidRegisterSourceHeader:
|
63
63
|
case IssuesManager.AttributionReportingIssue.IssueCode.InvalidRegisterTriggerHeader:
|
64
64
|
case IssuesManager.AttributionReportingIssue.IssueCode.InvalidEligibleHeader:
|
65
|
+
case IssuesManager.AttributionReportingIssue.IssueCode.SourceIgnored:
|
66
|
+
case IssuesManager.AttributionReportingIssue.IssueCode.TriggerIgnored:
|
65
67
|
this.appendColumnTitle(header, i18nString(UIStrings.request));
|
66
68
|
this.appendColumnTitle(header, i18nString(UIStrings.invalidHeaderValue));
|
67
69
|
break;
|
@@ -79,6 +81,9 @@ export class AttributionReportingIssueDetailsView extends AffectedResourcesView
|
|
79
81
|
this.appendColumnTitle(header, i18nString(UIStrings.element));
|
80
82
|
this.appendColumnTitle(header, i18nString(UIStrings.maximumConcurrentRegistrations));
|
81
83
|
break;
|
84
|
+
case IssuesManager.AttributionReportingIssue.IssueCode.SourceAndTriggerHeaders:
|
85
|
+
this.appendColumnTitle(header, i18nString(UIStrings.request));
|
86
|
+
break;
|
82
87
|
}
|
83
88
|
|
84
89
|
this.affectedResources.appendChild(header);
|
@@ -102,6 +107,8 @@ export class AttributionReportingIssueDetailsView extends AffectedResourcesView
|
|
102
107
|
case IssuesManager.AttributionReportingIssue.IssueCode.InvalidRegisterSourceHeader:
|
103
108
|
case IssuesManager.AttributionReportingIssue.IssueCode.InvalidRegisterTriggerHeader:
|
104
109
|
case IssuesManager.AttributionReportingIssue.IssueCode.InvalidEligibleHeader:
|
110
|
+
case IssuesManager.AttributionReportingIssue.IssueCode.SourceIgnored:
|
111
|
+
case IssuesManager.AttributionReportingIssue.IssueCode.TriggerIgnored:
|
105
112
|
this.#appendRequestOrEmptyCell(element, details.request);
|
106
113
|
this.appendIssueDetailCell(element, details.invalidParameter || '');
|
107
114
|
break;
|
@@ -119,6 +126,9 @@ export class AttributionReportingIssueDetailsView extends AffectedResourcesView
|
|
119
126
|
await this.#appendElementOrEmptyCell(element, issue);
|
120
127
|
this.appendIssueDetailCell(element, details.invalidParameter || '');
|
121
128
|
break;
|
129
|
+
case IssuesManager.AttributionReportingIssue.IssueCode.SourceAndTriggerHeaders:
|
130
|
+
this.#appendRequestOrEmptyCell(element, details.request);
|
131
|
+
break;
|
122
132
|
}
|
123
133
|
|
124
134
|
this.affectedResources.appendChild(element);
|
@@ -307,6 +307,22 @@ export class LinearMemoryInspectorController extends SDK.TargetManager.SDKModelO
|
|
307
307
|
return objType.slice(0, objType.length - 1);
|
308
308
|
}
|
309
309
|
|
310
|
+
// When inspecting a pointer variable, we indicate that we display the pointed-to object in the viewer
|
311
|
+
// by prepending an asterisk to the pointer expression's name (mimicking C++ dereferencing).
|
312
|
+
// If the object isn't a pointer, we return the expression unchanged.
|
313
|
+
//
|
314
|
+
// Examples:
|
315
|
+
// (int *) myNumber -> (int) *myNumber
|
316
|
+
// (int[]) numbers -> (int[]) numbers
|
317
|
+
static extractObjectName(obj: Bindings.DebuggerLanguagePlugins.ValueNode, expression: string): string {
|
318
|
+
const lastChar = obj.description?.charAt(obj.description.length - 1);
|
319
|
+
const isPointerType = lastChar === '*';
|
320
|
+
if (isPointerType) {
|
321
|
+
return '*' + expression;
|
322
|
+
}
|
323
|
+
return expression;
|
324
|
+
}
|
325
|
+
|
310
326
|
async openInspectorView(obj: SDK.RemoteObject.RemoteObject, address?: number, expression?: string): Promise<void> {
|
311
327
|
const response = await LinearMemoryInspectorController.retrieveDWARFMemoryObjectAndAddress(obj);
|
312
328
|
let memoryObj = obj;
|
@@ -368,7 +384,7 @@ export class LinearMemoryInspectorController extends SDK.TargetManager.SDKModelO
|
|
368
384
|
highlightInfo = {
|
369
385
|
startAddress: obj.inspectableAddress || 0,
|
370
386
|
size: LinearMemoryInspectorController.extractObjectSize(obj),
|
371
|
-
name: expression,
|
387
|
+
name: expression ? LinearMemoryInspectorController.extractObjectName(obj, expression) : expression,
|
372
388
|
type: LinearMemoryInspectorController.extractObjectTypeDescription(obj),
|
373
389
|
};
|
374
390
|
} catch (err) {
|
@@ -27,6 +27,7 @@ export const markdownLinks = new Map<string, string>([
|
|
27
27
|
],
|
28
28
|
['issueQuirksModeDoctype', 'https://web.dev/doctype/'],
|
29
29
|
['sameSiteAndSameOrigin', 'https://web.dev/same-site-same-origin/'],
|
30
|
+
['punycodeReference', 'https://wikipedia.org/wiki/Punycode'],
|
30
31
|
// Link URLs for deprecation issues (see blink::Deprecation)
|
31
32
|
['https://xhr.spec.whatwg.org/', 'https://xhr.spec.whatwg.org/'],
|
32
33
|
['https://goo.gle/chrome-insecure-origins', 'https://goo.gle/chrome-insecure-origins'],
|
@@ -36,7 +36,7 @@ export class JavaScriptREPL {
|
|
36
36
|
|
37
37
|
static async evaluateAndBuildPreview(
|
38
38
|
text: string, throwOnSideEffect: boolean, replMode: boolean, timeout?: number, allowErrors?: boolean,
|
39
|
-
objectGroup?: string, awaitPromise: boolean = false): Promise<{
|
39
|
+
objectGroup?: string, awaitPromise: boolean = false, silent: boolean = false): Promise<{
|
40
40
|
preview: DocumentFragment,
|
41
41
|
result: SDK.RuntimeModel.EvaluationResult|null,
|
42
42
|
}> {
|
@@ -56,7 +56,7 @@ export class JavaScriptREPL {
|
|
56
56
|
objectGroup: objectGroup,
|
57
57
|
disableBreaks: true,
|
58
58
|
replMode: replMode,
|
59
|
-
silent:
|
59
|
+
silent: silent,
|
60
60
|
returnByValue: undefined,
|
61
61
|
allowUnsafeEvalBlockedByCSP: undefined,
|
62
62
|
};
|
package/package.json
CHANGED