Bug 866947: Make nsDocument.cpp's static-var "sOnloadDecodeLimit" unsigned, to fix build warning for signed/unsigned comparison. r=jlebar
authorDaniel Holbert <dholbert@cs.stanford.edu>
Mon, 29 Apr 2013 16:15:59 -0700
changeset 141236 b1c9e6a9abcedc7503d89d2b6f909db45d3f11a0
parent 141235 e245f0728bc9bcfbb6c828c09e690ca22e5a0ccc
child 141237 edad44884ca6b7b423e9060b0d0f958da7c99802
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlebar
bugs866947
milestone23.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 866947: Make nsDocument.cpp's static-var "sOnloadDecodeLimit" unsigned, to fix build warning for signed/unsigned comparison. r=jlebar
content/base/src/nsDocument.cpp
--- a/content/base/src/nsDocument.cpp
+++ b/content/base/src/nsDocument.cpp
@@ -1861,28 +1861,28 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(ns
   if (tmp->mCSSLoader) {
     tmp->mCSSLoader->UnlinkCachedSheets();
   }
 
   tmp->mInUnlinkOrDeletion = false;
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
 static bool sPrefsInitialized = false;
-static int32_t sOnloadDecodeLimit = 0;
+static uint32_t sOnloadDecodeLimit = 0;
 
 nsresult
 nsDocument::Init()
 {
   if (mCSSLoader || mStyleImageLoader || mNodeInfoManager || mScriptLoader) {
     return NS_ERROR_ALREADY_INITIALIZED;
   }
 
   if (!sPrefsInitialized) {
     sPrefsInitialized = true;
-    Preferences::AddIntVarCache(&sOnloadDecodeLimit, "image.onload.decode.limit", 0);
+    Preferences::AddUintVarCache(&sOnloadDecodeLimit, "image.onload.decode.limit", 0);
   }
 
   mIdentifierMap.Init();
   mStyledLinks.Init();
   mRadioGroups.Init();
   mCustomPrototypes.Init();
 
   // If after creation the owner js global is not set for a document