Bug 131779

Summary: On iOS keep network process running using a process assertion rather than a boost
Product: WebKit Reporter: Gavin Barraclough <barraclough>
Component: Web Template FrameworkAssignee: Gavin Barraclough <barraclough>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Fix benjamin: review+

Description Gavin Barraclough 2014-04-16 17:41:25 PDT
.
Comment 1 Gavin Barraclough 2014-04-16 17:47:15 PDT
Created attachment 229507 [details]
Fix
Comment 2 WebKit Commit Bot 2014-04-16 17:49:22 PDT
Attachment 229507 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/ios/ProcessAssertion.mm:40:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 1 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Benjamin Poulain 2014-04-16 18:04:23 PDT
Comment on attachment 229507 [details]
Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=229507&action=review

> Source/WebKit2/UIProcess/WebProcessProxy.h:225
> +    std::unique_ptr<ProcessAssertion> m_assertion;

Let's move this guy to ChildProcessProxy.

> Source/WebKit2/UIProcess/ios/ProcessAssertion.h:39
> +    enum State {

typed enum?

> Source/WebKit2/UIProcess/ios/ProcessAssertion.mm:36
> +const BKSProcessAssertionFlags BackgroundTabFlags = (BKSProcessAssertionAllowIdleSleep);
> +const BKSProcessAssertionFlags ForegroundTabFlags = (BKSProcessAssertionAllowIdleSleep | BKSProcessAssertionPreventTaskSuspend | BKSProcessAssertionAllowSuspendOnSleep | BKSProcessAssertionWantsForegroundResourcePriority | BKSProcessAssertionPreventTaskThrottleDown);

Lowercase first letter for variable names.

We'll probably need something configurable for BKSProcessAssertionPreventTaskThrottleDown on the WebProcess.

> Source/WebKit2/UIProcess/ios/ProcessAssertion.mm:59
> +    m_assertionState = assertionState;

Let's assign this before the out call in case some delegate cause us to re-enter.
Comment 4 Gavin Barraclough 2014-04-16 18:40:35 PDT
Transmitting file data .........
Committed revision 167410.