Skip to content

Commit e19ac2e

Browse files
authored
Don't warn for UserTiming in profile processing. (#5524)
Our old UserTiming markers had a very useless static field. We already had a workaround to suppress a warning like this in the processed profile upgrader. Copy the workaround to profile processing, too. This will avoid some noise when running tests.
2 parents ad78ce1 + 21ac96c commit e19ac2e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/profile-logic/process-profile.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,9 +1482,12 @@ function _convertGeckoMarkerSchema(
14821482
const discardedFields = staticFields.filter(
14831483
(_f, i) => i !== staticDescriptionFieldIndex
14841484
);
1485-
if (discardedFields.length !== 0) {
1485+
const potentiallyUsefulDiscardedFields = discardedFields.filter(
1486+
(f) => f.label !== 'Marker' && f.value !== 'UserTiming'
1487+
);
1488+
if (potentiallyUsefulDiscardedFields.length !== 0) {
14861489
console.warn(
1487-
`Discarding the following static fields from marker schema "${name}": ${discardedFields.join(', ')}`
1490+
`Discarding the following static fields from marker schema "${markerSchema.name}": ${potentiallyUsefulDiscardedFields.map((f) => f.label + ': ' + f.value).join(', ')}`
14881491
);
14891492
}
14901493
description = staticFields[staticDescriptionFieldIndex].value;

0 commit comments

Comments
 (0)