Bug 1400100 - Shrink css::ImageValue. r=heycam.
This reduces sizeof(ImageValue) from 104 to 96. When heap-allocated, this moves
it from the 112 byte bin to the 96 byte bin. Loading gmail with Stylo, there
are about 11,500 ImageValues on the heap, so this saves about 184,000 bytes.
MozReview-Commit-ID: JLe2cJ54IlL
--- a/layout/style/nsCSSValue.h
+++ b/layout/style/nsCSSValue.h
@@ -262,23 +262,23 @@ struct ImageValue final : public URLValu
void Initialize(nsIDocument* aDocument);
// XXXheycam We should have our own SizeOfIncludingThis method.
protected:
~ImageValue();
+private:
+ bool mLoadedImage = false;
+
public:
// Inherit Equals from URLValueData
nsRefPtrHashtable<nsPtrHashKey<nsIDocument>, imgRequestProxy> mRequests;
-
-private:
- bool mLoadedImage = false;
};
struct GridNamedArea {
nsString mName;
uint32_t mColumnStart;
uint32_t mColumnEnd;
uint32_t mRowStart;
uint32_t mRowEnd;