Bug 1809128 - Simplify scheme check in imgLoader. r=tnikkel

Just a minor thing I noticed while going through this code.

Differential Revision: https://phabricator.services.mozilla.com/D166292
This commit is contained in:
Emilio Cobos Álvarez 2023-01-09 11:14:30 +00:00
Родитель 13ee6f9072
Коммит 8c3cea316f
1 изменённых файлов: 1 добавлений и 4 удалений

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

@ -1991,10 +1991,7 @@ bool imgLoader::ValidateEntry(
// just return true in that case. Doing so would mean that shift-reload
// doesn't reload data URI documents/images though (which is handy for
// debugging during gecko development) so we make an exception in that case.
nsAutoCString scheme;
aURI->GetScheme(scheme);
if (scheme.EqualsLiteral("data") &&
!(aLoadFlags & nsIRequest::LOAD_BYPASS_CACHE)) {
if (aURI->SchemeIs("data") && !(aLoadFlags & nsIRequest::LOAD_BYPASS_CACHE)) {
return true;
}