Bug 311037
| Summary: | [GTK] SkImage leaked in webkit_favicon_database_get_favicon_finish() | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Adrian Perez <aperez> |
| Component: | WebKitGTK | Assignee: | Adrian Perez <aperez> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | bugs-noreply |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Adrian Perez
The result from obtaining the image is a SkImage obtaibed with g_task_propagate_pointer(),
which gives us ownership of the resulting SkImage; but the SkImage is never unreffed.
The SkImage gets converted either into a GdkTexture or a cairo_surface_t; and the helper
functions used for this (skiaImageToGdkTexture and skiaImageToCairoSurface) both add
their own ref to the SkImage -- that is, the ref obtained from g_task_propagate_pointer()
is NOT moved.
Therefore, we need to make sure to adopt the ref we obtain from g_task_propagate_pointer()
to avoid leaking the SkImage.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Adrian Perez
Pull request: https://github.com/WebKit/WebKit/pull/61631
EWS
Committed 310202@main (1729470dcaa6): <https://commits.webkit.org/310202@main>
Reviewed commits have been landed. Closing PR #61631 and removing active labels.