Bug 1295671 - Detect use of system libpng in nsPNGDecoder.cpp. r=tn
authorGlenn Randers-Pehrson <glennrp+bmo@gmail.com>
Sat, 27 Aug 2016 01:23:00 -0400
changeset 312891 f25b22784bc95fbe57db5819995d733a980ec213
parent 312890 cd249dba87c2660f93409a99ca9296386d230345
child 312892 1d1f3141f6233037a00d0fd0b8fbb3e0a41178d8
push id81481
push userryanvm@gmail.com
push dateWed, 07 Sep 2016 01:49:54 +0000
treeherdermozilla-inbound@1d1f3141f623 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstn
bugs1295671
milestone51.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 1295671 - Detect use of system libpng in nsPNGDecoder.cpp. r=tn
image/decoders/nsPNGDecoder.cpp
--- a/image/decoders/nsPNGDecoder.cpp
+++ b/image/decoders/nsPNGDecoder.cpp
@@ -971,17 +971,17 @@ nsPNGDecoder::frame_info_callback(png_st
   // Save the information necessary to create the frame; we'll actually create
   // it when we return from the yield.
   const IntRect frameRect(png_get_next_frame_x_offset(png_ptr, decoder->mInfo),
                           png_get_next_frame_y_offset(png_ptr, decoder->mInfo),
                           png_get_next_frame_width(png_ptr, decoder->mInfo),
                           png_get_next_frame_height(png_ptr, decoder->mInfo));
   const bool isInterlaced = bool(decoder->interlacebuf);
 
-#ifndef PNGLCONF_H
+#ifndef MOZ_EMBEDDED_LIBPNG
   // if using system library, check frame_width and height against 0
   if (frameRect.width == 0)
     png_error(png_ptr, "Frame width must not be 0");
   if (frameRect.height == 0)
     png_error(png_ptr, "Frame height must not be 0");
 #endif
 
   const FrameInfo info { decoder->format, frameRect, isInterlaced };