Bug 1770160 - [devtools] Don't filter out platform-specific errors in Browser Console/Browser Toolbox. r=ochameau.

This is as simple as checking the session context type.

Differential Revision: https://phabricator.services.mozilla.com/D146818
This commit is contained in:
Nicolas Chevobbe 2022-05-20 05:47:23 +00:00
Родитель e01bbf47c5
Коммит 1e61e4307b
2 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -177,7 +177,8 @@ async function testMessages() {
0,
0,
Ci.nsIScriptError.warningFlag,
"Test",
// platform-specific category to test case for Bug 1770160
"chrome javascript",
gBrowser.selectedBrowser.innerWindowID
);
Services.console.logMessage(scriptErrorMessage);

Просмотреть файл

@ -105,7 +105,12 @@ class ErrorMessageWatcher extends nsIConsoleListenerWatcher {
return true;
}
// For non-process targets, we filter-out platform-specific errors.
// Don't restrict any categories in the Browser Toolbox/Browser Console
if (targetActor.sessionContext.type == "all") {
return true;
}
// For non-process targets in other toolboxes, we filter-out platform-specific errors.
return !PLATFORM_SPECIFIC_CATEGORIES.includes(category);
}