[Webkit-unassigned] [Bug 54406] png-1.5 fixes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Feb 27 02:46:41 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=54406





--- Comment #11 from Patrick R. Gansterer <paroga at paroga.com>  2011-02-27 02:46:41 PST ---
(From update of attachment 83969)
View in context: https://bugs.webkit.org/attachment.cgi?id=83969&action=review

Why does http://trac.webkit.org/browser/trunk/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp#L134 compile?
What's the exact compile error? I'm not sure it the longjmp part is really required.

> Source/WebCore/ChangeLog:6
> +        Fix compilation with png-1.5, and use new API to terminate data
> +        processing.

Please include the bug number.
If you have a look at the other changelogs the first line is usually the bug title, followed by the bug# and then a detailed description.
Please also include more information about what's the new api and why it doesn't compile any more (some mebers moved from public to private).
You can pass the bug# via "--bug" to preparechangelog.

> Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:50
> +static void pnglongjmp(png_structp png, int value)

Please don't use png as prefix. This function isn't part of libpng. Maybe you can use the first approach with png_longjmp and ignore the style warning, or use a function name without a png prefix. Adding a inline keyword would be good too.

> Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:56
> +#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 >= 5))
> +    png_longjmp(png, value);
> +#else
> +    longjmp(JMPBUF(png), value);
> +#endif

Can we merge this with the #define of JMPBUF ?

> Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:332
> +        m_reader->setReadOffset(m_reader->currentBufferSize() - png_process_data_pause(png, 0/*do not save the data*/));

Please don't use this "inline" comment. If you think the comment is required, write it in the line above as a one line comment (//) as a full sentence.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list