Backed out changeset 30b7a45177bf (bug 1377158)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Tue, 25 Jul 2017 14:33:45 +0200
changeset 421936 cc6128e68428576c75672244acd36784575537de
parent 421935 a769d1e1151369eac4fb06bf55b4233b39fcc7c6
child 421937 01e4f85ad7f69ede53f1b9a5132a7d9afa38c155
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1377158
milestone56.0a1
backs out30b7a45177bf28e258b8d811c08ef6ab8b4a135d
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 30b7a45177bf (bug 1377158)
image/ImageCacheKey.cpp
image/ImageCacheKey.h
--- a/image/ImageCacheKey.cpp
+++ b/image/ImageCacheKey.cpp
@@ -57,38 +57,34 @@ ImageCacheKey::ImageCacheKey(nsIURI* aUR
   NS_ENSURE_SUCCESS_VOID(aRv);
 
   MOZ_ASSERT(NS_IsMainThread());
 
   if (URISchemeIs(mURI, "blob")) {
     mBlobSerial = BlobSerial(mURI);
   }
 
-  mHash = ComputeHash(mURI, mBlobSerial, mOriginAttributes, mControlledDocument,
-                      aDocument ? aDocument->GetStyleBackendType()
-                                : StyleBackendType::None);
+  mHash = ComputeHash(mURI, mBlobSerial, mOriginAttributes, mControlledDocument);
 }
 
 ImageCacheKey::ImageCacheKey(ImageURL* aURI,
                              const OriginAttributes& aAttrs,
                              nsIDocument* aDocument)
   : mURI(aURI)
   , mOriginAttributes(aAttrs)
   , mControlledDocument(GetControlledDocumentToken(aDocument))
   , mIsChrome(URISchemeIs(mURI, "chrome"))
 {
   MOZ_ASSERT(aURI);
 
   if (URISchemeIs(mURI, "blob")) {
     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)
   : mURI(aOther.mURI)
   , mBlobSerial(aOther.mBlobSerial)
   , mOriginAttributes(aOther.mOriginAttributes)
   , mControlledDocument(aOther.mControlledDocument)
   , mHash(aOther.mHash)
@@ -131,28 +127,27 @@ ImageCacheKey::Spec() const
 {
   return mURI->Spec();
 }
 
 /* static */ PLDHashNumber
 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.
 
   nsPrintfCString ptr("%p", aControlledDocument);
   nsAutoCString suffix;
   aAttrs.CreateSuffix(suffix);
 
   return AddToHash(0, aURI->ComputeHash(aBlobSerial),
-                   HashString(suffix), HashString(ptr), (uint8_t)aStyleBackendType);
+                   HashString(suffix), HashString(ptr));
 }
 
 /* static */ void*
 ImageCacheKey::GetControlledDocumentToken(nsIDocument* aDocument)
 {
   // For non-controlled documents, we just return null.  For controlled
   // documents, we cast the pointer into a void* to avoid dereferencing
   // it (since we only use it for comparisons), and return it.
--- a/image/ImageCacheKey.h
+++ b/image/ImageCacheKey.h
@@ -8,17 +8,16 @@
  */
 
 #ifndef mozilla_image_src_ImageCacheKey_h
 #define mozilla_image_src_ImageCacheKey_h
 
 #include "mozilla/BasePrincipal.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/RefPtr.h"
-#include "mozilla/StyleBackendType.h"
 
 class nsIDocument;
 class nsIURI;
 
 namespace mozilla {
 namespace image {
 
 class ImageURL;
@@ -54,18 +53,17 @@ public:
   /// A token indicating which service worker controlled document this entry
   /// belongs to, if any.
   void* ControlledDocument() const { return mControlledDocument; }
 
 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;
   Maybe<uint64_t> mBlobSerial;
   OriginAttributes mOriginAttributes;
   void* mControlledDocument;
   PLDHashNumber mHash;
   bool mIsChrome;