Bug 136892

Summary: Always have a PageThrottler (sometimes have a UserActivity::Impl)
Product: WebKit Reporter: Gavin Barraclough <barraclough>
Component: WebCore Misc.Assignee: Gavin Barraclough <barraclough>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, mitz
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Fix ggaren: review+

Description Gavin Barraclough 2014-09-17 10:47:13 PDT
Some instances of Page have a PageThrottler to track activity on the Page, and some do not. (Specifically, those created from WebPage in WK2 do, those related to WK1, SVG & inspector do not).

We do this for three reasons:
    • We do not need to take AppNap assertions on WK1.
    • Some Pages do not track their visibility correctly, and would always claim to be visible.
    • Page VisibilityState is not set until after construction, so if we instantiate 

Creating the entire PageThrottler lazily has the drawback that we have to check for its existence at numerous points throughout the code, and we'll miss activity that occurs between the Page being created & the PageThrottler added to it (really a theoretical problem right now, since they're currently always created pretty much back to back).

Instead, Page should always have a PageThrottler, & instead make the UserActivity::Impl on the PageThrottler be added later.
Comment 1 Gavin Barraclough 2014-09-17 11:14:24 PDT
Created attachment 238258 [details]
Fix
Comment 2 WebKit Commit Bot 2014-09-17 11:16:50 PDT
Attachment 238258 [details] did not pass style-queue:


ERROR: Source/WebKit2/ChangeLog:12:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebKit2/ChangeLog:13:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebKit2/ChangeLog:14:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebCore/ChangeLog:12:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebCore/ChangeLog:13:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: Source/WebCore/ChangeLog:14:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
Total errors found: 6 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Geoffrey Garen 2014-09-17 11:19:56 PDT
Comment on attachment 238258 [details]
Fix

r=me
Comment 4 Gavin Barraclough 2014-09-17 11:27:56 PDT
Transmitting file data ...........
Committed revision 173696.