Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information