[SCM] WebKit Debian packaging branch, webkit-1.2, updated. 1.2.5-1500-gb65db3c

Gustavo Noronha Silva gns at gnome.org
Tue Jan 11 11:42:00 UTC 2011


The following commit has been merged in the webkit-1.2 branch:
commit b7c7ac279df21f223a13e529ed5dcf1107ee39b0
Author: philn at webkit.org <philn at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jun 29 13:58:22 2010 +0000

    2010-06-21  Philippe Normand  <pnormand at igalia.com>
    
            Reviewed by Xan Lopez.
    
            [PNG decoder] direct access to jmpbuf is deprecated in libpng >= 1.4.0beta103
            https://bugs.webkit.org/show_bug.cgi?id=40907
    
            Define a JMPBUF macro to cope with deprecation of the jmpbuf
            attribute in libpng >= 1.4.
    
            * platform/image-decoders/png/PNGImageDecoder.cpp:
            (WebCore::decodingFailed):
            (WebCore::PNGImageReader::decode):
            (WebCore::PNGImageDecoder::headerAvailable):
            (WebCore::PNGImageDecoder::rowAvailable):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62114 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8f76090..9b69c79 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-06-21  Philippe Normand  <pnormand at igalia.com>
+
+        Reviewed by Xan Lopez.
+
+        [PNG decoder] direct access to jmpbuf is deprecated in libpng >= 1.4.0beta103
+        https://bugs.webkit.org/show_bug.cgi?id=40907
+
+        Define a JMPBUF macro to cope with deprecation of the jmpbuf
+        attribute in libpng >= 1.4.
+
+        * platform/image-decoders/png/PNGImageDecoder.cpp:
+        (WebCore::decodingFailed):
+        (WebCore::PNGImageReader::decode):
+        (WebCore::PNGImageDecoder::headerAvailable):
+        (WebCore::PNGImageDecoder::rowAvailable):
+
 2010-11-30  Huzaifa Sidhpurwala <huzaifas at redhat.com>
 
         Backport crash fix for
diff --git a/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp b/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
index de01d55..cd814eb 100644
--- a/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
+++ b/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
@@ -41,6 +41,12 @@
 #include "PNGImageDecoder.h"
 #include "png.h"
 
+#if defined(PNG_LIBPNG_VER_MAJOR) && defined(PNG_LIBPNG_VER_MINOR) && (PNG_LIBPNG_VER_MAJOR > 1 || (PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR >= 4))
+#define JMPBUF(png_ptr) png_jmpbuf(png_ptr)
+#else
+#define JMPBUF(png_ptr) png_ptr->jmpbuf
+#endif
+
 namespace WebCore {
 
 // Gamma constants.
@@ -54,7 +60,7 @@ const unsigned long cMaxPNGSize = 1000000UL;
 // Called if the decoding of the image fails.
 static void PNGAPI decodingFailed(png_structp png, png_const_charp)
 {
-    longjmp(png->jmpbuf, 1);
+    longjmp(JMPBUF(png), 1);
 }
 
 // Callbacks given to the read struct.  The first is for warnings (we want to
@@ -125,7 +131,7 @@ public:
         PNGImageDecoder* decoder = static_cast<PNGImageDecoder*>(png_get_progressive_ptr(m_png));
 
         // We need to do the setjmp here. Otherwise bad things will happen.
-        if (setjmp(m_png->jmpbuf)) {
+        if (setjmp(JMPBUF(m_png))) {
             close();
             decoder->setFailed();
             return;
@@ -215,13 +221,13 @@ void PNGImageDecoder::headerAvailable()
     
     // Protect against large images.
     if (png->width > cMaxPNGSize || png->height > cMaxPNGSize) {
-        longjmp(png->jmpbuf, 1);
+        longjmp(JMPBUF(png), 1);
         return;
     }
     
     // We can fill in the size now that the header is available.
     if (!setSize(width, height)) {
-        longjmp(png->jmpbuf, 1);
+        longjmp(JMPBUF(png), 1);
         return;
     }
 
@@ -285,7 +291,7 @@ void PNGImageDecoder::rowAvailable(unsigned char* rowBuffer, unsigned rowIndex,
     RGBA32Buffer& buffer = m_frameBufferCache[0];
     if (buffer.status() == RGBA32Buffer::FrameEmpty) {
         if (!buffer.setSize(scaledSize().width(), scaledSize().height())) {
-            longjmp(m_reader->pngPtr()->jmpbuf, 1);
+            longjmp(JMPBUF(m_reader->pngPtr()), 1);
             return;
         }
         buffer.setStatus(RGBA32Buffer::FramePartial);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list