RFR: 8347937: Canvas pattern test fails and crashes on WebKit 620.1

Kevin Rushforth kcr at openjdk.org
Fri Mar 21 21:07:15 UTC 2025


On Fri, 21 Mar 2025 08:17:39 GMT, Jay Bhaskar <jbhaskar at openjdk.org> wrote:

> Issue: 
> Ref: Webkit 619.1 javafx.web/src/main/native/Source/WebCore/platform/graphics/ImageSource.cpp refactoring in 620.1
> In the case of the canvas pattern using a transform property filled with an SVGMatrix()
> created by an SVG element, `frame.m_nativeImage->size()` calls `NativeImage::size()`
> from NativeImageJava.cpp. In this scenario, `*m_platformImage->getImage().get()` may be invalid,
> as the image decoder has already populated `frame.m_size` during image metadata caching.
> 
> Solution:
> To avoid potential invalid accesses and unintended size resets, only update `m_size`
> if the frame does not already have a valid native image.

Additional testing looks good.

@arapte or @aghaisas Can one of you be the second reviewer?

@snazarkin Any additional feedback?

-------------

Marked as reviewed by kcr (Lead).

PR Review: https://git.openjdk.org/jfx/pull/1740#pullrequestreview-2707256184
PR Comment: https://git.openjdk.org/jfx/pull/1740#issuecomment-2744445116


More information about the openjfx-dev mailing list