Bug 1162751 - Part 2: Always disable pallete index checking. r=seth
authorEric Rahm <erahm@mozilla.com>
Mon, 11 May 2015 13:42:30 -0700
changeset 243398 37f361e463b3ea5246eb313cb0a4c065a2a05937
parent 243397 6983be82c92b4a569c65b0f65d8a0a29a5729580
child 243399 f9af70b6e6de1ce8e1c823fbdad417c9e084ab79
push id28738
push usercbook@mozilla.com
push dateTue, 12 May 2015 14:11:31 +0000
treeherdermozilla-central@bedce1b405a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersseth
bugs1162751
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 1162751 - Part 2: Always disable pallete index checking. r=seth The original assumption was that PR_LOGGING wouldn't be enabled in release builds. Considering that this warning isn't actionable and PR_LOGGING is now always defined it's better to just always disable pallete index checking.
image/decoders/nsPNGDecoder.cpp
--- a/image/decoders/nsPNGDecoder.cpp
+++ b/image/decoders/nsPNGDecoder.cpp
@@ -281,25 +281,23 @@ nsPNGDecoder::InitInternal()
 
 #ifdef PNG_SET_USER_LIMITS_SUPPORTED
   if (mCMSMode != eCMSMode_Off) {
     png_set_chunk_malloc_max(mPNG, 4000000L);
   }
 #endif
 
 #ifdef PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED
-#ifndef PR_LOGGING
   // Disallow palette-index checking, for speed; we would ignore the warning
-  // anyhow unless we have defined PR_LOGGING.  This feature was added at
-  // libpng version 1.5.10 and is disabled in the embedded libpng but enabled
-  // by default in the system libpng.  This call also disables it in the
-  // system libpng, for decoding speed.  Bug #745202.
+  // anyhow.  This feature was added at libpng version 1.5.10 and is disabled
+  // in the embedded libpng but enabled by default in the system libpng.  This
+  // call also disables it in the system libpng, for decoding speed.
+  // Bug #745202.
   png_set_check_for_invalid_index(mPNG, 0);
 #endif
-#endif
 
 #if defined(PNG_SET_OPTION_SUPPORTED) && defined(PNG_sRGB_PROFILE_CHECKS) && \
             PNG_sRGB_PROFILE_CHECKS >= 0
   // Skip checking of sRGB ICC profiles
   png_set_option(mPNG, PNG_SKIP_sRGB_CHECK_PROFILE, PNG_OPTION_ON);
 #endif
 
   // use this as libpng "progressive pointer" (retrieve in callbacks)