Bug 1900435 - Add extra_labels back to the mobile reporter; r=twisniewski,webcompat-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D212510
This commit is contained in:
Ksenia Berezina 2024-06-04 15:54:53 +00:00
parent 2466b5fb7c
commit 883f596167
3 changed files with 11 additions and 5 deletions

View File

@ -32,10 +32,13 @@ const getReporterConfig = (() => {
port.onMessage.addListener(message => {
if ("productName" in message) {
androidReporterConfig.productName = message.productName;
androidReporterConfig.extra_labels = [
`browser-${message.productName}`,
];
resolve(androidReporterConfig);
// For now, setting the productName is the only use for this port, and that's only happening
// once after startup, so let's disconnect the port when we're done.
// For now, setting the productName and extra_labels is the only use for this port,
// and that's only happening once after startup, so let's disconnect the port when we're done.
port.disconnect();
}
});

View File

@ -32,10 +32,13 @@ const getReporterConfig = (() => {
port.onMessage.addListener(message => {
if ("productName" in message) {
androidReporterConfig.productName = message.productName;
androidReporterConfig.extra_labels = [
`browser-${message.productName}`,
];
resolve(androidReporterConfig);
// For now, setting the productName is the only use for this port, and that's only happening
// once after startup, so let's disconnect the port when we're done.
// For now, setting the productName and extra_labels is the only use for this port,
// and that's only happening once after startup, so let's disconnect the port when we're done.
port.disconnect();
}
});

View File

@ -256,7 +256,7 @@ export class ReportBrokenSiteChild extends JSWindowActorChild {
reporterConfig,
webcompatInfo,
}) {
const extra_labels = [];
const extra_labels = reporterConfig?.extra_labels || [];
const message = Object.assign({}, reporterConfig, {
url: reportUrl,