Bug 36127 - purgeInactiveFontData() should also prune glyph data
Summary: purgeInactiveFontData() should also prune glyph data
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-15 12:36 PDT by Yong Li
Modified: 2010-03-15 13:27 PDT (History)
2 users (show)

See Also:


Attachments
the patch (1.23 KB, patch)
2010-03-15 12:40 PDT, Yong Li
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yong Li 2010-03-15 12:36:04 PDT
FontCache::purgeInactiveFontData() is called to delete some inactive SimpleFontData objects. But the deleted SimpleFontData objects' glyph data are still left in glyph page tree. I think this can be considered as leaks. Following code fixes it.

-    for (size_t i = 0; i < fontDataToDeleteCount; ++i)
+    for (size_t i = 0; i < fontDataToDeleteCount; ++i) {
+        GlyphPageTreeNode::pruneTreeFontData(fontDataToDelete[i]);
         delete fontDataToDelete[i];
+    }

Patch is following
Comment 1 Yong Li 2010-03-15 12:40:30 PDT
Created attachment 50722 [details]
the patch
Comment 2 Yong Li 2010-03-15 13:18:12 PDT
Comment on attachment 50722 [details]
the patch

review canceled. 

seems it's already called SimpleFontData's dtor. need more investigation on why this code helps
Comment 3 Yong Li 2010-03-15 13:27:02 PDT
sorry. seems like a false alarm. will reopen it if necessary