Bug 1043181 - Copy mValues and mGeneration in the nsCSSCounterStyleRule copy constructor. r=dbaron a=sylvestre
authorCameron McCormack <cam@mcc.id.au>
Mon, 28 Jul 2014 09:21:12 +1000
changeset 217255 a55b8ef060a808e25d93f363be7df2a5e0dde994
parent 217254 8cc35ac81ce7097c4c27632e1f97dd3456e23441
child 217256 e7d4238dd07581eb67eadd996f554d549ffe3159
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron, sylvestre
bugs1043181
milestone33.0a2
Bug 1043181 - Copy mValues and mGeneration in the nsCSSCounterStyleRule copy constructor. r=dbaron a=sylvestre
layout/style/nsCSSRules.cpp
--- a/layout/style/nsCSSRules.cpp
+++ b/layout/style/nsCSSRules.cpp
@@ -3079,19 +3079,23 @@ CSSSupportsRule::SizeOfIncludingThis(Mal
 // Must be outside namespace
 DOMCI_DATA(CSSSupportsRule, mozilla::CSSSupportsRule)
 
 // -------------------------------------------
 // nsCSSCounterStyleRule
 //
 
 nsCSSCounterStyleRule::nsCSSCounterStyleRule(const nsCSSCounterStyleRule& aCopy)
-  : Rule(aCopy),
-    mName(aCopy.mName)
-{
+  : Rule(aCopy)
+  , mName(aCopy.mName)
+  , mGeneration(aCopy.mGeneration)
+{
+  for (size_t i = 0; i < eCSSCounterDesc_COUNT; i++) {
+    mValues[i] = aCopy.mValues[i];
+  }
 }
 
 nsCSSCounterStyleRule::~nsCSSCounterStyleRule()
 {
 }
 
 /* virtual */ already_AddRefed<css::Rule>
 nsCSSCounterStyleRule::Clone() const