Bug 1156104 - Mark nsROCSSPrimitiveValue::m{Color,Value,URI} as MOZ_OWNING_REF; r=dbaron
authorEhsan Akhgari <ehsan@mozilla.com>
Sun, 19 Apr 2015 14:46:47 -0400
changeset 271237 97c2b9527d941647df628fa06bc218b415ed4445
parent 271236 fb6a787276ec2e013c068e3ab395e3365cdb78e3
child 271238 6bedf3cbdba1e8aac119fbd91e4681f708eba285
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1156104
milestone40.0a1
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
Bug 1156104 - Mark nsROCSSPrimitiveValue::m{Color,Value,URI} as MOZ_OWNING_REF; r=dbaron
layout/style/nsROCSSPrimitiveValue.h
--- a/layout/style/nsROCSSPrimitiveValue.h
+++ b/layout/style/nsROCSSPrimitiveValue.h
@@ -111,18 +111,19 @@ private:
 
   uint16_t mType;
 
   union {
     nscoord         mAppUnits;
     float           mFloat;
     int32_t         mInt32;
     uint32_t        mUint32;
-    nsDOMCSSRGBColor* mColor;
-    nsDOMCSSRect*     mRect;
+    // These can't be nsRefPtr's because they are used inside a union.
+    nsDOMCSSRGBColor* MOZ_OWNING_REF mColor;
+    nsDOMCSSRect* MOZ_OWNING_REF mRect;
     char16_t*      mString;
     nsIURI*         mURI;
     nsCSSKeyword    mKeyword;
   } mValue;
 };
 
 inline nsROCSSPrimitiveValue *mozilla::dom::CSSValue::AsPrimitiveValue()
 {