Bug 163363 - Add API to restrict WebKit processes to background priority
Summary: Add API to restrict WebKit processes to background priority
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gavin Barraclough
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-12 15:17 PDT by Gavin Barraclough
Modified: 2016-10-14 11:24 PDT (History)
1 user (show)

See Also:


Attachments
Fix (10.74 KB, patch)
2016-10-14 09:39 PDT, Gavin Barraclough
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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?