[Webkit-unassigned] [Bug 157172] [OpenType] OpenTypeVerticalData object should not be created if the font is not OpenType

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 29 09:35:16 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=157172

--- Comment #2 from Darin Adler <darin at apple.com> ---
Comment on attachment 277690
  --> https://bugs.webkit.org/attachment.cgi?id=277690
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=277690&action=review

> Source/WebCore/platform/graphics/FontCache.cpp:322
>      auto addResult = fontVerticalDataCache().add(platformData, nullptr);
> -    if (addResult.isNewEntry) {
> -        RefPtr<OpenTypeVerticalData> data = OpenTypeVerticalData::create(platformData);
> -        addResult.iterator->value = data->isOpenType() ? WTFMove(data) : nullptr;
> -    }
> +    if (addResult.isNewEntry)
> +        addResult.iterator->value = OpenTypeVerticalData::create(platformData);

This is now a perfect candidate for using the new "ensure" function instead of add.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160429/9a08c77d/attachment.html>


More information about the webkit-unassigned mailing list