Bug 1740985 - Consistent error messages for scripts which failed to load. r=dom-storage-reviewers,edenchuang

Differential Revision: https://phabricator.services.mozilla.com/D133515
This commit is contained in:
Jan Rio Krause 2021-12-17 16:18:24 +00:00
Родитель 59cac0e2a0
Коммит 9b755d54c9
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -2437,6 +2437,10 @@ void ReportLoadError(ErrorResult& aRv, nsresult aLoadResult,
aRv.ThrowSecurityError(err); aRv.ThrowSecurityError(err);
break; break;
case NS_ERROR_CORRUPTED_CONTENT:
aRv.Throw(NS_ERROR_DOM_NETWORK_ERR);
break;
default: default:
// For lack of anything better, go ahead and throw a NetworkError here. // For lack of anything better, go ahead and throw a NetworkError here.
// We don't want to throw a JS exception, because for toplevel script // We don't want to throw a JS exception, because for toplevel script