[Webkit-unassigned] [Bug 85089] [Qt] ASSERT in FontCustomPlatformDataQt.cpp with invalid font in data URI

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 2 11:40:57 PDT 2012


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





--- Comment #5 from Keith Rosenblatt <keith.rosenblatt at nokia.com>  2012-05-02 11:40:57 PST ---
(From update of attachment 139254)
View in context: https://bugs.webkit.org/attachment.cgi?id=139254&action=review

>> Source/WebCore/ChangeLog:11
>> +        No new tests.
> 
> Well, shouldn't there be one then? :) It doesn't sound difficult to create a layout test that triggers the assert in a debug build.

Indeed there should.  For some reason I thought that tests would not be run with a debug build.

>>> Source/WebCore/platform/graphics/qt/FontCustomPlatformDataQt.cpp:77
>>> +        delete data;
>> 
>> Maybe we could avoid allocating and de-allocating memory for a FontCustomPlatformData instance altogether in that case by creating a temporary QRawFont instance on the stack before that and doing the load / check there.
>> If it's valid, the implicit sharing makes copying it to the newly created FontCustomPlatformData almost free anyway.
> 
> I agree with Pierre. Either a temporary QRawFont object or putting FontCustomPlatformData into an OwnPtr that is leaked() on return.

Makes sense.  New patch attached.  Thank you for your comments.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list