[webkit-reviews] review granted: [Bug 67160] Add a way to get JavaScript, memory, WebCore cache, and font statistics in WebProcess : [Attachment 105812] Gather JavaScript, FastMalloc, icon, font, and glyph page statistics in WebProcess::getWebCoreStatistics()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 31 13:28:55 PDT 2011


Sam Weinig <sam at webkit.org> has granted Ada Chan <adachan at apple.com>'s request
for review:
Bug 67160: Add a way to get JavaScript, memory, WebCore cache, and font
statistics in WebProcess
https://bugs.webkit.org/show_bug.cgi?id=67160

Attachment 105812: Gather JavaScript, FastMalloc, icon, font, and glyph page
statistics in WebProcess::getWebCoreStatistics()
https://bugs.webkit.org/attachment.cgi?id=105812&action=review

------- Additional Comments from Sam Weinig <sam at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=105812&action=review


> Source/WebKit2/UIProcess/WebContext.cpp:807
> +    RefPtr<MutableDictionary> result = MutableDictionary::create();
> +    HashMap<String, uint32_t>::const_iterator end = map.end();
> +    for (HashMap<String, uint32_t>::const_iterator it = map.begin(); it !=
end; ++it)
> +	   result->set(it->first,
RefPtr<WebUInt64>(WebUInt64::create(it->second)).get());
> +    

It seems odd that we are using uint32_t and then making the API uint64_t.  I
think the internal representation (in the HashMap) should be uint64_t.

> Source/WebKit2/UIProcess/WebContext.cpp:820
> +    statistics->set("JavaScriptProtectedObjectTypeCounts",
RefPtr<MutableDictionary>(createDictionaryFromHashMap(statisticsData.javaScript
ProtectedObjectTypeCounts)).get());

The RefPtr car should no be necessary.


More information about the webkit-reviews mailing list