Bug 1510817 - Don't doubly warn when we can't load a script due to tracking protection; r=baku

Differential Revision: https://phabricator.services.mozilla.com/D14861

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ehsan Akhgari 2018-12-18 15:19:02 +00:00
Родитель c3a839f3e2
Коммит c970e3b98e
1 изменённых файлов: 3 добавлений и 0 удалений

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

@ -2919,6 +2919,9 @@ void ScriptLoader::ReportErrorToConsole(ScriptLoadRequest* aRequest,
message = isScript ? "ScriptSourceMalformed" : "ModuleSourceMalformed";
} else if (aResult == NS_ERROR_DOM_BAD_URI) {
message = isScript ? "ScriptSourceNotAllowed" : "ModuleSourceNotAllowed";
} else if (aResult == NS_ERROR_TRACKING_URI) {
// Tracking protection errors already show their own console messages.
return;
} else {
message = isScript ? "ScriptSourceLoadFailed" : "ModuleSourceLoadFailed";
}