Backed out changeset 1536fa69bad4 (bug 1399758) for Hazard failures. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Fri, 15 Sep 2017 10:00:52 +0200
changeset 665566 a7f12e31f7e02368b00d72ac73bf3c661d55d0ad
parent 665565 50770364778192f030136c3ac91528fbe994df28
child 665567 f7b896fc877805e3d3a51376f5f22b522f2e448a
push id80115
push userbmo:eoger@fastmail.com
push dateFri, 15 Sep 2017 18:29:01 +0000
reviewersbackout
bugs1399758
milestone57.0a1
backs out1536fa69bad4d6ee7f1f4c265fab57504f6263d9
Backed out changeset 1536fa69bad4 (bug 1399758) for Hazard failures. r=backout
layout/style/ServoBindings.cpp
layout/style/ServoBindings.h
layout/style/nsCSSValue.cpp
layout/style/nsCSSValue.h
--- a/layout/style/ServoBindings.cpp
+++ b/layout/style/ServoBindings.cpp
@@ -1522,24 +1522,16 @@ Gecko_ImageValue_Create(ServoBundledURI 
   NS_ConvertUTF8toUTF16 url(reinterpret_cast<const char*>(aURI.mURLString),
                             aURI.mURLStringLength);
 
   RefPtr<css::ImageValue> value(
     new css::ImageValue(url, do_AddRef(aURI.mExtraData)));
   return value.forget().take();
 }
 
-MOZ_DEFINE_MALLOC_SIZE_OF(GeckoImageValueMallocSizeOf)
-
-size_t
-Gecko_ImageValue_SizeOfIncludingThis(mozilla::css::ImageValue* aImageValue)
-{
-  return aImageValue->SizeOfIncludingThis(GeckoImageValueMallocSizeOf);
-}
-
 void
 Gecko_SetLayerImageImageValue(nsStyleImage* aImage,
                               mozilla::css::ImageValue* aImageValue)
 {
   MOZ_ASSERT(aImage && aImageValue);
 
   RefPtr<nsStyleImageRequest> req =
     CreateStyleImageRequest(nsStyleImageRequest::Mode::Track, aImageValue);
--- a/layout/style/ServoBindings.h
+++ b/layout/style/ServoBindings.h
@@ -338,17 +338,16 @@ nsIAtom* Gecko_CounterStyle_GetName(cons
 const mozilla::AnonymousCounterStyle*
 Gecko_CounterStyle_GetAnonymous(const mozilla::CounterStylePtr* ptr);
 
 // background-image style.
 void Gecko_SetNullImageValue(nsStyleImage* image);
 void Gecko_SetGradientImageValue(nsStyleImage* image, nsStyleGradient* gradient);
 NS_DECL_THREADSAFE_FFI_REFCOUNTING(mozilla::css::ImageValue, ImageValue);
 mozilla::css::ImageValue* Gecko_ImageValue_Create(ServoBundledURI aURI);
-size_t Gecko_ImageValue_SizeOfIncludingThis(mozilla::css::ImageValue* aImageValue);
 void Gecko_SetLayerImageImageValue(nsStyleImage* image,
                                    mozilla::css::ImageValue* aImageValue);
 
 void Gecko_SetImageElement(nsStyleImage* image, nsIAtom* atom);
 void Gecko_CopyImageValueFrom(nsStyleImage* image, const nsStyleImage* other);
 void Gecko_InitializeImageCropRect(nsStyleImage* image);
 
 nsStyleGradient* Gecko_CreateGradient(uint8_t shape,
--- a/layout/style/nsCSSValue.cpp
+++ b/layout/style/nsCSSValue.cpp
@@ -2145,17 +2145,18 @@ nsCSSValue::SizeOfExcludingThis(mozilla:
 
     // URL
     case eCSSUnit_URL:
       n += mValue.mURL->SizeOfIncludingThis(aMallocSizeOf);
       break;
 
     // Image
     case eCSSUnit_Image:
-      n += mValue.mImage->SizeOfIncludingThis(aMallocSizeOf);
+      // Not yet measured.  Measurement may be added later if DMD finds it
+      // worthwhile.
       break;
 
     // Gradient
     case eCSSUnit_Gradient:
       n += mValue.mGradient->SizeOfIncludingThis(aMallocSizeOf);
       break;
 
     // TokenStream
@@ -3071,25 +3072,16 @@ css::ImageValue::~ImageValue()
       proxy->CancelAndForgetObserver(NS_BINDING_ABORTED);
     }
 
     iter.Remove();
   }
 }
 
 size_t
-css::ImageValue::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
-{
-  size_t n = aMallocSizeOf(this);
-  n += css::URLValueData::SizeOfExcludingThis(aMallocSizeOf);
-  n += mRequests.ShallowSizeOfExcludingThis(aMallocSizeOf);
-  return n;
-}
-
-size_t
 css::ComplexColorValue::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
 {
   // Only measure it if it's unshared, to avoid double-counting.
   size_t n = 0;
   if (mRefCnt <= 1) {
     n += aMallocSizeOf(this);
   }
   return n;
--- a/layout/style/nsCSSValue.h
+++ b/layout/style/nsCSSValue.h
@@ -214,17 +214,17 @@ struct ImageValue final : public URLValu
   ImageValue(const nsAString& aString,
              already_AddRefed<URLExtraData> aExtraData);
 
   ImageValue(const ImageValue&) = delete;
   ImageValue& operator=(const ImageValue&) = delete;
 
   void Initialize(nsIDocument* aDocument);
 
-  size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
+  // XXXheycam We should have our own SizeOfIncludingThis method.
 
 protected:
   ~ImageValue();
 
 public:
   // Inherit Equals from URLValueData
 
   nsRefPtrHashtable<nsPtrHashKey<nsIDocument>, imgRequestProxy> mRequests;