Bug 1558915 - Use infallible nsIURI::SchemeIs in image/ r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D40459
This commit is contained in:
@@ -48,9 +48,9 @@ ImageCacheKey::ImageCacheKey(nsIURI* aURI, const OriginAttributes& aAttrs,
|
||||
mControlledDocument(GetSpecialCaseDocumentToken(aDocument, aURI)),
|
||||
mTopLevelBaseDomain(GetTopLevelBaseDomain(aDocument, aURI)),
|
||||
mIsChrome(false) {
|
||||
if (SchemeIs("blob")) {
|
||||
if (mURI->SchemeIs("blob")) {
|
||||
mBlobSerial = BlobSerial(mURI);
|
||||
} else if (SchemeIs("chrome")) {
|
||||
} else if (mURI->SchemeIs("chrome")) {
|
||||
mIsChrome = true;
|
||||
}
|
||||
}
|
||||
@@ -144,11 +144,6 @@ void ImageCacheKey::EnsureHash() const {
|
||||
mHash.emplace(hash);
|
||||
}
|
||||
|
||||
bool ImageCacheKey::SchemeIs(const char* aScheme) {
|
||||
bool matches = false;
|
||||
return NS_SUCCEEDED(mURI->SchemeIs(aScheme, &matches)) && matches;
|
||||
}
|
||||
|
||||
/* static */
|
||||
void* ImageCacheKey::GetSpecialCaseDocumentToken(Document* aDocument,
|
||||
nsIURI* aURI) {
|
||||
|
||||
Reference in New Issue
Block a user