Title: [94838] trunk/Source/WebCore
Revision
94838
Author
simon...@chromium.org
Date
2011-09-09 00:14:01 -0700 (Fri, 09 Sep 2011)

Log Message

[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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (94837 => 94838)


--- trunk/Source/WebCore/ChangeLog	2011-09-09 06:48:26 UTC (rev 94837)
+++ trunk/Source/WebCore/ChangeLog	2011-09-09 07:14:01 UTC (rev 94838)
@@ -1,3 +1,17 @@
+2011-09-09  James Simonsen  <simon...@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  <rn...@webkit.org>
 
         Push more code from HTMLInputElement::setValue to TextFieldInputType::setValue

Modified: trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp (94837 => 94838)


--- trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp	2011-09-09 06:48:26 UTC (rev 94837)
+++ trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp	2011-09-09 07:14:01 UTC (rev 94838)
@@ -163,6 +163,7 @@
 #if USE(SKIA_ON_MAC_CHROMIUM)
     RemoteFontStream* stream = new RemoteFontStream(buffer);
     fontCustomPlatformData->m_typeface = SkTypeface::CreateFromStream(stream);
+    stream->unref();
 #endif
     return fontCustomPlatformData;
 }

Modified: trunk/Source/WebCore/platform/graphics/skia/FontCustomPlatformData.cpp (94837 => 94838)


--- trunk/Source/WebCore/platform/graphics/skia/FontCustomPlatformData.cpp	2011-09-09 06:48:26 UTC (rev 94837)
+++ trunk/Source/WebCore/platform/graphics/skia/FontCustomPlatformData.cpp	2011-09-09 07:14:01 UTC (rev 94838)
@@ -190,6 +190,7 @@
 #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);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to