Commit 9dacf219 authored by simonjam@chromium.org's avatar simonjam@chromium.org

[Chromium] Fix leak of Skia stream with custom CSS fonts

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

Reviewed by Adam Barth.

Test: fast/css/font-face-opentype.html under valgrind

* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::createFontCustomPlatformData):
* platform/graphics/skia/FontCustomPlatformData.cpp:
(WebCore::createFontCustomPlatformData):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3e4fa066
2011-09-09 James Simonsen <simonjam@chromium.org>
[Chromium] Fix leak of Skia stream with custom CSS fonts
https://bugs.webkit.org/show_bug.cgi?id=67815
Reviewed by Adam Barth.
Test: fast/css/font-face-opentype.html under valgrind
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::createFontCustomPlatformData):
* platform/graphics/skia/FontCustomPlatformData.cpp:
(WebCore::createFontCustomPlatformData):
2011-09-07 Ryosuke Niwa <rniwa@webkit.org>
Push more code from HTMLInputElement::setValue to TextFieldInputType::setValue
......@@ -163,6 +163,7 @@ FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer* buffer)
#if USE(SKIA_ON_MAC_CHROMIUM)
RemoteFontStream* stream = new RemoteFontStream(buffer);
fontCustomPlatformData->m_typeface = SkTypeface::CreateFromStream(stream);
stream->unref();
#endif
return fontCustomPlatformData;
}
......
......@@ -190,6 +190,7 @@ FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer* buffer)
#elif OS(UNIX) || PLATFORM(BREWMP)
RemoteFontStream* stream = new RemoteFontStream(buffer);
SkTypeface* typeface = SkTypeface::CreateFromStream(stream);
stream->unref();
if (!typeface)
return 0;
return new FontCustomPlatformData(typeface);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment