No bug. Add comment to nsStyleClipPath::ReleaseRef explaining why only one member is nulled out. r=me (NPOTB)
authorJonathan Watt <jwatt@jwatt.org>
Tue, 11 Aug 2015 10:38:37 +0100
changeset 260295 ac9440ab2fca85aaa58ad7afb2b9ebd85a83ad7f
parent 260294 4cd9f5b5462fa6ff5eca99eacbd2bb23c66321a9
child 260296 a34b6482a7b689453a4aab2b9f06af591a4a8b03
push id29307
push userryanvm@gmail.com
push dateWed, 02 Sep 2015 01:01:53 +0000
treeherdermozilla-central@e2eb0442ece9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
milestone43.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
No bug. Add comment to nsStyleClipPath::ReleaseRef explaining why only one member is nulled out. r=me (NPOTB)
layout/style/nsStyleStruct.cpp
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -1115,16 +1115,18 @@ nsStyleClipPath::ReleaseRef()
 {
   if (mType == NS_STYLE_CLIP_PATH_SHAPE) {
     NS_ASSERTION(mBasicShape, "expected pointer");
     mBasicShape->Release();
   } else if (mType == NS_STYLE_CLIP_PATH_URL) {
     NS_ASSERTION(mURL, "expected pointer");
     mURL->Release();
   }
+  // mBasicShap, mURL, etc. are all pointers in a union of pointers. Nulling
+  // one of them nulls all of them:
   mURL = nullptr;
 }
 
 void
 nsStyleClipPath::SetURL(nsIURI* aURL)
 {
   NS_ASSERTION(aURL, "expected pointer");
   ReleaseRef();