Bug 163363

Summary: Add API to restrict WebKit processes to background priority
Product: WebKit Reporter: Gavin Barraclough <barraclough>
Component: WebKit2Assignee: Gavin Barraclough <barraclough>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Fix andersca: review+

Description Gavin Barraclough 2016-10-12 15:17:36 PDT
This may be useful to some clients.
Comment 1 Gavin Barraclough 2016-10-14 09:39:53 PDT
Created attachment 291641 [details]
Fix
Comment 2 WebKit Commit Bot 2016-10-14 09:41:46 PDT
Attachment 291641 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:0:  Use #pragma once header guard.  [build/header_guard] [5]
Total errors found: 1 in 12 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Anders Carlsson 2016-10-14 10:30:29 PDT
Comment on attachment 291641 [details]
Fix

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

> Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.h:112
> +    bool alwaysRunsAtBackgroundPriority() const { return m_alwaysRunsAtBackgroundPriority; }
> +    void setAlwaysRunsAtBackgroundPriority(bool alwaysRunsAtBackgroundPriority) { m_alwaysRunsAtBackgroundPriority = alwaysRunsAtBackgroundPriority; }

I believe the copy function needs to copy this member variable.
Comment 4 Gavin Barraclough 2016-10-14 11:09:37 PDT
Committed revision 207346.
Comment 5 Simon Fraser (smfr) 2016-10-14 11:24:49 PDT
Comment on attachment 291641 [details]
Fix

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

> Source/WebKit2/UIProcess/WebProcessPool.h:369
> +    bool alwaysRunsAtBackgroundPriority() { return m_alwaysRunsAtBackgroundPriority; }

This should be const.

> Source/WebKit2/UIProcess/WebProcessProxy.h:211
> +    bool alwaysRunsAtBackgroundPriority() override;

Can this be const?