summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaireho <chinglanho@gmail.com>2010-08-20 13:01:30 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-08-20 13:01:30 -0700
commit6ba0b43722d16bc295606bec39f396f596e4fef1 (patch)
tree910792105e99798f162010c9c8550394751b0f90
parente4f33b798e088fbc8f00d6300716be1d24dda0de (diff)
parenta8cbb273facae4b7fc5c44de730b2068d59ebde7 (diff)
downloadexternal_webkit-6ba0b43722d16bc295606bec39f396f596e4fef1.zip
external_webkit-6ba0b43722d16bc295606bec39f396f596e4fef1.tar.gz
external_webkit-6ba0b43722d16bc295606bec39f396f596e4fef1.tar.bz2
Merge "Bug2857086 - memory leak in FontCustomPlatformData. The change can also fix Chrome issue32353 - need to patch to Chrome."
-rw-r--r--WebCore/platform/graphics/android/FontCustomPlatformData.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/WebCore/platform/graphics/android/FontCustomPlatformData.cpp b/WebCore/platform/graphics/android/FontCustomPlatformData.cpp
index fbce1fa..90a9f41 100644
--- a/WebCore/platform/graphics/android/FontCustomPlatformData.cpp
+++ b/WebCore/platform/graphics/android/FontCustomPlatformData.cpp
@@ -64,6 +64,8 @@ FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer* buffer)
// make a copy of it.
SkStream* stream = new SkMemoryStream(buffer->data(), buffer->size(), true);
SkTypeface* face = SkTypeface::CreateFromStream(stream);
+ // Release the stream.
+ stream->unref();
if (0 == face) {
SkDebugf("--------- SkTypeface::CreateFromBuffer failed %d\n",
buffer->size());