Update On Fri May 26 20:49:06 CEST 2023

This commit is contained in:
github-action[bot] 2023-05-26 20:49:07 +02:00
parent 394dd3c669
commit 652af91bab
2579 changed files with 197550 additions and 33466 deletions

View file

@ -29,26 +29,30 @@ using namespace dom;
namespace image {
ImageCacheKey::ImageCacheKey(nsIURI* aURI, const OriginAttributes& aAttrs,
ImageCacheKey::ImageCacheKey(nsIURI* aURI, CORSMode aCORSMode,
const OriginAttributes& aAttrs,
Document* aDocument)
: mURI(aURI),
mOriginAttributes(aAttrs),
mControlledDocument(GetSpecialCaseDocumentToken(aDocument)),
mIsolationKey(GetIsolationKey(aDocument, aURI)) {}
mIsolationKey(GetIsolationKey(aDocument, aURI)),
mCORSMode(aCORSMode) {}
ImageCacheKey::ImageCacheKey(const ImageCacheKey& aOther)
: mURI(aOther.mURI),
mOriginAttributes(aOther.mOriginAttributes),
mControlledDocument(aOther.mControlledDocument),
mIsolationKey(aOther.mIsolationKey),
mHash(aOther.mHash) {}
mHash(aOther.mHash),
mCORSMode(aOther.mCORSMode) {}
ImageCacheKey::ImageCacheKey(ImageCacheKey&& aOther)
: mURI(std::move(aOther.mURI)),
mOriginAttributes(aOther.mOriginAttributes),
mControlledDocument(aOther.mControlledDocument),
mIsolationKey(aOther.mIsolationKey),
mHash(aOther.mHash) {}
mHash(aOther.mHash),
mCORSMode(aOther.mCORSMode) {}
bool ImageCacheKey::operator==(const ImageCacheKey& aOther) const {
// Don't share the image cache between a controlled document and anything
@ -67,6 +71,10 @@ bool ImageCacheKey::operator==(const ImageCacheKey& aOther) const {
return false;
}
if (mCORSMode != aOther.mCORSMode) {
return false;
}
// For non-blob URIs, compare the URIs.
bool equals = false;
nsresult rv = mURI->Equals(aOther.mURI, &equals);