Changeset 52492 in webkit
- Timestamp:
- Dec 22, 2009 10:51:00 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r52491 r52492 1 2009-12-22 Kwang Yul Seo <skyul@company100.net> 2 3 Reviewed by Darin Adler. 4 5 Allocate RemoteFontStream on the heap 6 https://bugs.webkit.org/show_bug.cgi?id=32850 7 8 RemoteFontStream is allocated on the stack, so its memory is freed 9 immediately when FontCustomPlatformData::createFontCustomPlatformData 10 returns. 11 12 SkTypeface::CreateFromStream increments the reference count, but it keeps 13 the pointer to the memory allocated on the stack which is not valid 14 anymore. 15 16 RemoteFontStream is a descendant of SkRefCount and SkRefCount::unref 17 invokes SkDELETE(this) internally once the reference count reaches zero. 18 This means that SkRefCount-ed instances must be allocated on the heap. 19 20 * platform/graphics/chromium/FontCustomPlatformData.cpp: 21 (WebCore::createFontCustomPlatformData): 22 1 23 2009-12-22 Kwang Yul Seo <skyul@company100.net> 2 24 -
trunk/WebCore/platform/graphics/chromium/FontCustomPlatformData.cpp
r51623 r52492 191 191 return new FontCustomPlatformData(fontReference, fontName); 192 192 #elif PLATFORM(LINUX) 193 RemoteFontStream stream(buffer);194 SkTypeface* typeface = SkTypeface::CreateFromStream( &stream);193 RemoteFontStream* stream = new RemoteFontStream(buffer); 194 SkTypeface* typeface = SkTypeface::CreateFromStream(stream); 195 195 if (!typeface) 196 196 return 0;
Note: See TracChangeset
for help on using the changeset viewer.