[Webkit-unassigned] [Bug 157132] [FreeType] ASSERTION FAILED: !lookupForWriting(Extractor::extract(entry)).second in FontCache::getVerticalData()
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Apr 29 02:21:49 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=157132
--- Comment #3 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to comment #2)
> Comment on attachment 277613 [details]
> Patch
>
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=277613&action=review
>
> > Source/WebCore/platform/graphics/FontCache.cpp:326
> > + if (!data->isOpenType()) {
> > + fontVerticalDataCache().remove(addResult.iterator);
> > + return nullptr;
> > + }
>
> This isnât good, because it will not cache the negative result and so if
> OpenTypeVerticalData::create returns something that is not OpenType then it
> will call OpenTypeVerticalData::create again and again every time this
> function is called. And it will also add/remove an element to/from the hash
> map every time.
>
> I think what we want instead is:
>
> if (!data->isOpenType())
> data = nullptr;
>
> We will cache a nullptr and not call OpenTypeVerticalData::create again next
> time.
Good point!
> Separately, I also think itâs peculiar that OpenTypeVerticalData::create can
> create something that returns false to isOpenType. Thereâs some kind of
> naming mistake there. I would think, given its name, that function would
> return nullptr if the data is "not OpenType".
Yes, I was also surprised, maybe we could move the initialization to the create method and simply return nullptr . I'll look at it in more detail.
--
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/e59f400b/attachment.html>
More information about the webkit-unassigned
mailing list