Bug 35045

Summary: Add a way for WebView and its dependencies to be selectively included in WebKitStatistics leak tracking
Product: WebKit Reporter: Timothy Hatcher <timothy>
Component: WebKit Misc.Assignee: Timothy Hatcher <timothy>
Status: RESOLVED FIXED    
Severity: Normal CC: aroben, darin, mitz
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Proposed Change aroben: review+, timothy: commit-queue-

Description Timothy Hatcher 2010-02-17 10:59:35 PST
We need to add a way for WebView and it's dependancies to be selectively included in WebKitStatistics leak tracking. Right now WebView's that live the whole life of the process mess up the tracking statistics.
Comment 1 Timothy Hatcher 2010-02-17 10:59:48 PST
<rdar://problem/7567677&7572900>
Comment 2 Timothy Hatcher 2010-02-17 11:01:29 PST
Created attachment 48914 [details]
Proposed Change
Comment 3 Adam Roben (:aroben) 2010-02-17 11:09:14 PST
Comment on attachment 48914 [details]
Proposed Change

This patch will make all WebViews not be included in WebKitStatistics by default. Is that really what we want? This will affect the behavior of all WebKit apps that use WebKitStatistics.

Maybe it would be better to have a way to exclude certain WebViews, rather than excluding them all by default?
Comment 4 Timothy Hatcher 2010-02-17 11:13:13 PST
WebKitStatistics is private, only Safari uses it.
Comment 5 Adam Roben (:aroben) 2010-02-17 13:32:15 PST
Comment on attachment 48914 [details]
Proposed Change

> ++ (BOOL)isIncludedInWebKitStatistics;

I think it would be better to name this +shouldIncludeInWebKitStatistics. But I'd only change this one method; everything else should keep using "is" (since the other methods/members really mean "have I added myself to the relevant WebKit statistic?").

Should it start with an underscore?

r=me
Comment 6 Timothy Hatcher 2010-02-17 13:50:03 PST
Landed in r54908.
Comment 7 Darin Adler 2010-02-18 11:06:43 PST
(In reply to comment #5)
> (From update of attachment 48914 [details])
> > ++ (BOOL)isIncludedInWebKitStatistics;
> 
> I think it would be better to name this +shouldIncludeInWebKitStatistics.

For boolean methods we normally make them fit a sentence, like this:

    "class <xxx>"

Using the word "class" since this is a class method. The sentence, "Class should include in WebKit statistics" isn't quite right, so maybe a name like shouldBeIncludedInWebKitStatistics would be more appropriate.