Bug 757977 - Don't use uint32 in nsCycleCollector::ScanWeakMaps; r=bsmedberg
authorMs2ger <ms2ger@gmail.com>
Fri, 25 May 2012 09:18:30 +0200
changeset 94816 1cb527eb50412c516ae7ed744592f2f115f707e9
parent 94815 9f4b10b1ff45fd2925bc6da6aa19bcaa4a1859ab
child 94817 fb91158d8c9a40803168bfbd4e5b2e8baea2b97f
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersbsmedberg
bugs757977
milestone15.0a1
Bug 757977 - Don't use uint32 in nsCycleCollector::ScanWeakMaps; r=bsmedberg
xpcom/base/nsCycleCollector.cpp
--- a/xpcom/base/nsCycleCollector.cpp
+++ b/xpcom/base/nsCycleCollector.cpp
@@ -2129,18 +2129,18 @@ nsCycleCollector::ScanWeakMaps()
 {
     bool anyChanged;
     do {
         anyChanged = false;
         for (PRUint32 i = 0; i < mGraph.mWeakMaps.Length(); i++) {
             WeakMapping *wm = &mGraph.mWeakMaps[i];
 
             // If mMap or mKey are null, the original object was marked black.
-            uint32 mColor = wm->mMap ? wm->mMap->mColor : black;
-            uint32 kColor = wm->mKey ? wm->mKey->mColor : black;
+            uint32_t mColor = wm->mMap ? wm->mMap->mColor : black;
+            uint32_t kColor = wm->mKey ? wm->mKey->mColor : black;
             PtrInfo *v = wm->mVal;
 
             // All non-null weak mapping maps, keys and values are
             // roots (in the sense of WalkFromRoots) in the cycle
             // collector graph, and thus should have been colored
             // either black or white in ScanRoots().
             NS_ASSERTION(mColor != grey, "Uncolored weak map");
             NS_ASSERTION(kColor != grey, "Uncolored weak map key");