Backed out changeset 30b7a45177bf (bug 1377158)

This commit is contained in:
Carsten "Tomcat" Book 2017-07-25 14:33:45 +02:00
Родитель 479379519a
Коммит 194537d8c5
2 изменённых файлов: 5 добавлений и 12 удалений

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

@ -62,9 +62,7 @@ ImageCacheKey::ImageCacheKey(nsIURI* aURI,
mBlobSerial = BlobSerial(mURI);
}
mHash = ComputeHash(mURI, mBlobSerial, mOriginAttributes, mControlledDocument,
aDocument ? aDocument->GetStyleBackendType()
: StyleBackendType::None);
mHash = ComputeHash(mURI, mBlobSerial, mOriginAttributes, mControlledDocument);
}
ImageCacheKey::ImageCacheKey(ImageURL* aURI,
@ -81,9 +79,7 @@ ImageCacheKey::ImageCacheKey(ImageURL* aURI,
mBlobSerial = BlobSerial(mURI);
}
mHash = ComputeHash(mURI, mBlobSerial, mOriginAttributes, mControlledDocument,
aDocument ? aDocument->GetStyleBackendType()
: StyleBackendType::None);
mHash = ComputeHash(mURI, mBlobSerial, mOriginAttributes, mControlledDocument);
}
ImageCacheKey::ImageCacheKey(const ImageCacheKey& aOther)
@ -136,8 +132,7 @@ ImageCacheKey::Spec() const
ImageCacheKey::ComputeHash(ImageURL* aURI,
const Maybe<uint64_t>& aBlobSerial,
const OriginAttributes& aAttrs,
void* aControlledDocument,
StyleBackendType aStyleBackendType)
void* aControlledDocument)
{
// Since we frequently call Hash() several times in a row on the same
// ImageCacheKey, as an optimization we compute our hash once and store it.
@ -147,7 +142,7 @@ ImageCacheKey::ComputeHash(ImageURL* aURI,
aAttrs.CreateSuffix(suffix);
return AddToHash(0, aURI->ComputeHash(aBlobSerial),
HashString(suffix), HashString(ptr), (uint8_t)aStyleBackendType);
HashString(suffix), HashString(ptr));
}
/* static */ void*

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

@ -13,7 +13,6 @@
#include "mozilla/BasePrincipal.h"
#include "mozilla/Maybe.h"
#include "mozilla/RefPtr.h"
#include "mozilla/StyleBackendType.h"
class nsIDocument;
class nsIURI;
@ -59,8 +58,7 @@ private:
static PLDHashNumber ComputeHash(ImageURL* aURI,
const Maybe<uint64_t>& aBlobSerial,
const OriginAttributes& aAttrs,
void* aControlledDocument,
mozilla::StyleBackendType aStyleBackendType);
void* aControlledDocument);
static void* GetControlledDocumentToken(nsIDocument* aDocument);
RefPtr<ImageURL> mURI;