Skip to content

Commit 6166371

Browse files
danilsomsikovDevtools-frontend LUCI CQ
authored andcommitted
Fix priority and size fields in the cookie table.
Even though these are attributes, they are not returned by `getAttribute` by the CookieModel Bug: 399692465 Change-Id: I8b465652e04467f58092bd82ff9e935f3040c25e Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6308774 Commit-Queue: Benedikt Meurer <[email protected]> Auto-Submit: Danil Somsikov <[email protected]> Reviewed-by: Benedikt Meurer <[email protected]>
1 parent a5123a0 commit 6166371

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

front_end/ui/legacy/components/cookie_table/CookiesTable.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,9 +473,8 @@ export class CookiesTable extends UI.Widget.VBox {
473473
const isRequest = cookie.type() === SDK.Cookie.Type.REQUEST;
474474
const data: CookieData = {name: cookie.name(), value: cookie.value()};
475475
for (const attribute
476-
of [SDK.Cookie.Attribute.SIZE, SDK.Cookie.Attribute.HTTP_ONLY, SDK.Cookie.Attribute.SECURE,
477-
SDK.Cookie.Attribute.SAME_SITE, SDK.Cookie.Attribute.SOURCE_SCHEME, SDK.Cookie.Attribute.SOURCE_PORT,
478-
SDK.Cookie.Attribute.PRIORITY]) {
476+
of [SDK.Cookie.Attribute.HTTP_ONLY, SDK.Cookie.Attribute.SECURE, SDK.Cookie.Attribute.SAME_SITE,
477+
SDK.Cookie.Attribute.SOURCE_SCHEME, SDK.Cookie.Attribute.SOURCE_PORT]) {
479478
if (cookie.hasAttribute(attribute)) {
480479
data[attribute] = String(cookie.getAttribute(attribute) ?? true);
481480
}
@@ -496,6 +495,8 @@ export class CookiesTable extends UI.Widget.VBox {
496495
data[SDK.Cookie.Attribute.PARTITION_KEY_SITE] =
497496
cookie.partitionKeyOpaque() ? i18nString(UIStrings.opaquePartitionKey) : cookie.topLevelSite();
498497
data[SDK.Cookie.Attribute.HAS_CROSS_SITE_ANCESTOR] = cookie.hasCrossSiteAncestor() ? 'true' : '';
498+
data[SDK.Cookie.Attribute.SIZE] = String(cookie.size());
499+
data[SDK.Cookie.Attribute.PRIORITY] = cookie.priority();
499500
data.priorityValue = ['Low', 'Medium', 'High'].indexOf(cookie.priority());
500501
const blockedReasons = this.cookieToBlockedReasons?.get(cookie) || [];
501502
for (const blockedReason of blockedReasons) {

0 commit comments

Comments
 (0)