Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebCore::PathQt::platformPath(): don't return a temporary object #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on May 29, 2024

  1. WebCore::PathQt::platformPath(): don't return a temporary object

    `WebCore::Path::platformPath()` expects to be able to return the return
    value of `WebCore::PlatformPathImpl::platformPath()` as a
    `PlatformPathPtr` without creating a dangling reference. However,
    `WebCore::PathQt::platformPath()` is defined as returning a temporary
    `QPainterPath` object, which does become a dangling reference when
    returned by reference, leading to segfaults at runtime.
    
    This commit changes the return type of `WebCore::PathQt::platformPath()`
    to `PlatformPathPtr` (paralleling the definition of
    `WebCore::PathCG::platformPath()`), so as to avoid creating a temporary
    `QPainterPath` object, thereby avoiding the creation of a dangling
    reference when returning from `WebCore::Path::platformPath()`.
    
    Fixes: movableink#37
    whitslack committed May 29, 2024
    Configuration menu
    Copy the full SHA
    3297fc5 View commit details
    Browse the repository at this point in the history