[Webkit-unassigned] [Bug 225279] [GTK] segmentation fault in WebKit::IconDatabase::loadIconForPageURL
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue May 4 03:14:04 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=225279
Adrian Perez <aperez at igalia.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aperez at igalia.com
--- Comment #8 from Adrian Perez <aperez at igalia.com> ---
(In reply to Jim Mason from comment #7)
> Thanks for the feedback.
>
> In setIconForPageURL, I am tempted to simplify this:
>
> auto image = BitmapImage::create();
> if (image->setData(SharedBuffer::create(iconData, iconDataSize), true) <
> EncodedDataStatus::SizeAvailable)
> result = false;
> else if (auto nativeImage = image->nativeImageForCurrentFrame())
> addResult.iterator->value.first = nativeImage->platformImage();
> else
> result = false;
>
> to something like this:
>
> RefPtr<NativeImage> nativeImage;
> auto image = BitmapImage::create();
> if (image->setData(SharedBuffer::create(iconData, iconDataSize), true)
> >= EncodedDataStatus::SizeAvailable &&
> (nativeImage = image->nativeImageForCurrentFrame()))
> addResult.iterator->value.first = nativeImage->platformImage();
> else
> result = false;
>
> However, this means using RefPtr<NativeImage> instead of auto; I have doubts
> whether this frowned upon. Advice?
There are similar bits of code all around WebKit, this is fine ️
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210504/a8eceff8/attachment.htm>
More information about the webkit-unassigned
mailing list