Record UMA when web app manifest contains invalid JSON comments. [chromium/src : main]

0 views
Skip to first unread message

François Beaufort (Gerrit)

unread,
Oct 28, 2021, 3:55:25 AM10/28/21
to blink-...@chromium.org, dmurph+watch...@chromium.org, dominickn+wa...@chromium.org, kinuko...@chromium.org, webap...@microsoft.com

Attention is currently required from: Dominick Ng, François Beaufort.

François Beaufort uploaded patch set #5 to this change.

View Change

Record UMA when web app manifest contains invalid JSON comments.

This CL makes sure a UMA is recorded when web app manifest code contains
invalid JSON comments. It does so by providing an optional boolean
parameter to the Blink JSON parser.

Note that Safari and Firefox don't allow comments in manifest.

Test: Go to https://spiky-pyrite-goose.glitch.me/, and check histograms
in chrome://histograms/Manifest.HasComments
Change-Id: I0cfedf79b7bc009e7cbd4c79dd4e5c94aee4179e
Bug: 1263590, 1264024
---
M third_party/blink/renderer/platform/json/json_parser_test.cc
M third_party/blink/renderer/platform/json/json_parser.cc
M third_party/blink/renderer/platform/json/json_parser.h
M third_party/blink/renderer/modules/manifest/manifest_uma_util.h
M third_party/blink/renderer/modules/manifest/manifest_uma_util.cc
M third_party/blink/renderer/modules/manifest/manifest_parser.cc
M tools/metrics/histograms/metadata/others/histograms.xml
7 files changed, 109 insertions(+), 44 deletions(-)

To view, visit change 3247155. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0cfedf79b7bc009e7cbd4c79dd4e5c94aee4179e
Gerrit-Change-Number: 3247155
Gerrit-PatchSet: 5
Gerrit-Owner: François Beaufort <beaufort...@gmail.com>
Gerrit-Reviewer: Dominick Ng <domi...@chromium.org>
Gerrit-Reviewer: François Beaufort <beaufort...@gmail.com>
Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
Gerrit-Attention: Dominick Ng <domi...@chromium.org>
Gerrit-Attention: François Beaufort <beaufort...@gmail.com>
Gerrit-MessageType: newpatchset

François Beaufort (Gerrit)

unread,
Oct 28, 2021, 3:56:05 AM10/28/21
to blink-...@chromium.org, dmurph+watch...@chromium.org, dominickn+wa...@chromium.org, kinuko...@chromium.org, webap...@microsoft.com, Tricium, Kent Tamura, Dominick Ng, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Dominick Ng.

View Change

1 comment:

  • File third_party/blink/renderer/modules/manifest/manifest_parser.cc:

    • Patch Set #3, Line 108: _, /*strict_mode=*/true

      This is a web-exposed change, so we probably need to treat this as a deprecation (as per https://bug […]

      As discussed offline, I've uploaded a new patch. Let me know what you think.

To view, visit change 3247155. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0cfedf79b7bc009e7cbd4c79dd4e5c94aee4179e
Gerrit-Change-Number: 3247155
Gerrit-PatchSet: 5
Gerrit-Owner: François Beaufort <beaufort...@gmail.com>
Gerrit-Reviewer: Dominick Ng <domi...@chromium.org>
Gerrit-Reviewer: François Beaufort <beaufort...@gmail.com>
Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
Gerrit-Attention: Dominick Ng <domi...@chromium.org>
Gerrit-Comment-Date: Thu, 28 Oct 2021 07:55:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Dominick Ng <domi...@chromium.org>
Gerrit-MessageType: comment

François Beaufort (Gerrit)

unread,
Oct 28, 2021, 4:35:55 AM10/28/21
to Matt Giuca, blink-...@chromium.org, dmurph+watch...@chromium.org, dominickn+wa...@chromium.org, kinuko...@chromium.org, webap...@microsoft.com, Kent Tamura, Dominick Ng

Attention is currently required from: Matt Giuca, Dominick Ng.

François Beaufort would like Matt Giuca to review this change.

View Change

Record UMA when web app manifest contains invalid JSON comments.

This CL makes sure a UMA is recorded when web app manifest code contains
invalid JSON comments. It does so by providing an optional boolean
parameter to the Blink JSON parser.

Note that Safari and Firefox don't allow comments in manifest.

Test: Go to https://spiky-pyrite-goose.glitch.me/, and check histograms
in chrome://histograms/Manifest.HasComments
Change-Id: I0cfedf79b7bc009e7cbd4c79dd4e5c94aee4179e
Bug: 1263590, 1264024
---
M third_party/blink/renderer/platform/json/json_parser_test.cc
M third_party/blink/renderer/platform/json/json_parser.cc
M third_party/blink/renderer/platform/json/json_parser.h
M third_party/blink/renderer/modules/manifest/manifest_uma_util.h
M third_party/blink/renderer/modules/manifest/manifest_uma_util.cc
M third_party/blink/renderer/modules/manifest/manifest_parser.cc
M tools/metrics/histograms/metadata/others/histograms.xml
7 files changed, 109 insertions(+), 44 deletions(-)


To view, visit change 3247155. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0cfedf79b7bc009e7cbd4c79dd4e5c94aee4179e
Gerrit-Change-Number: 3247155
Gerrit-PatchSet: 6
Gerrit-Owner: François Beaufort <beaufort...@gmail.com>
Gerrit-Reviewer: Dominick Ng <domi...@chromium.org>
Gerrit-Reviewer: François Beaufort <beaufort...@gmail.com>
Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
Gerrit-Reviewer: Matt Giuca <mgi...@chromium.org>
Gerrit-Attention: Matt Giuca <mgi...@chromium.org>
Gerrit-Attention: Dominick Ng <domi...@chromium.org>
Gerrit-MessageType: newchange

Dominick Ng (Gerrit)

unread,
Oct 28, 2021, 7:26:25 PM10/28/21
to François Beaufort, blink-...@chromium.org, dmurph+watch...@chromium.org, dominickn+wa...@chromium.org, kinuko...@chromium.org, webap...@microsoft.com, Matt Giuca, Tricium, Kent Tamura, Dominick Ng, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Matt Giuca, François Beaufort.

View Change

4 comments:

  • Patchset:

  • File third_party/blink/renderer/modules/manifest/manifest_parser.cc:

To view, visit change 3247155. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0cfedf79b7bc009e7cbd4c79dd4e5c94aee4179e
Gerrit-Change-Number: 3247155
Gerrit-PatchSet: 7
Gerrit-Owner: François Beaufort <beaufort...@gmail.com>
Gerrit-Reviewer: Dominick Ng <domi...@chromium.org>
Gerrit-Reviewer: François Beaufort <beaufort...@gmail.com>
Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
Gerrit-Reviewer: Matt Giuca <mgi...@chromium.org>
Gerrit-Attention: Matt Giuca <mgi...@chromium.org>
Gerrit-Attention: François Beaufort <beaufort...@gmail.com>
Gerrit-Comment-Date: Thu, 28 Oct 2021 23:26:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Dominick Ng <domi...@chromium.org>
Comment-In-Reply-To: François Beaufort <beaufort...@gmail.com>
Gerrit-MessageType: comment
Reply all
Reply to author
Forward
0 new messages