Bug 311037

Summary: [GTK] SkImage leaked in webkit_favicon_database_get_favicon_finish()
Product: WebKit Reporter: Adrian Perez <aperez>
Component: WebKitGTKAssignee: Adrian Perez <aperez>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Adrian Perez
Reported 2026-03-29 15:26:43 PDT
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
Adrian Perez
Comment 1 2026-03-29 15:31:52 PDT
EWS
Comment 2 2026-03-29 22:59:45 PDT
Committed 310202@main (1729470dcaa6): <https://commits.webkit.org/310202@main> Reviewed commits have been landed. Closing PR #61631 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.