<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[207346] trunk/Source/WebKit2</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/207346">207346</a></dd>
<dt>Author</dt> <dd>barraclough@apple.com</dd>
<dt>Date</dt> <dd>2016-10-14 11:06:47 -0700 (Fri, 14 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add API to restrict WebKit processes to background priority
https://bugs.webkit.org/show_bug.cgi?id=163363

Reviewed by Anders Carlson.

Add API on _WKProcessPoolConfiguration to flag a process pool as 'alwaysRunsAtBackgroundPriority'.
WebContent and Networking processes associated with that pool will only run a background priority,
when they otherwise would have run at foreground priority.

* UIProcess/API/APIProcessPoolConfiguration.h:
    - Add m_alwaysRunsAtBackgroundPriority flag to pool configuration object.
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration alwaysRunsAtBackgroundPriority]):
(-[_WKProcessPoolConfiguration setAlwaysRunsAtBackgroundPriority:]):
    - Expose new configuration property through API.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::alwaysRunsAtBackgroundPriority):
* UIProcess/Network/NetworkProcessProxy.h:
    - Support ProcessThrottlerClient interface to check if alwaysRunsAtBackgroundPriority is set.
* UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::assertionState):
    - When determining whether to take a foreground exception check alwaysRunsAtBackgroundPriority.
* UIProcess/ProcessThrottlerClient.h:
    - Add interface to access alwaysRunsAtBackgroundPriority state of WebProcess of NetworkProcess.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool):
* UIProcess/WebProcessPool.h:
    - Add m_alwaysRunsAtBackgroundPriority, set by configuration.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::alwaysRunsAtBackgroundPriority):
* UIProcess/WebProcessProxy.h:
    - Support ProcessThrottlerClient interface to check if alwaysRunsAtBackgroundPriority is set.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIProcessPoolConfigurationcpp">trunk/Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIProcessPoolConfigurationh">trunk/Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoa_WKProcessPoolConfigurationh">trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoa_WKProcessPoolConfigurationmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessNetworkNetworkProcessProxycpp">trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessNetworkNetworkProcessProxyh">trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessProcessThrottlercpp">trunk/Source/WebKit2/UIProcess/ProcessThrottler.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessProcessThrottlerClienth">trunk/Source/WebKit2/UIProcess/ProcessThrottlerClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessPoolcpp">trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessPoolh">trunk/Source/WebKit2/UIProcess/WebProcessPool.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessProxycpp">trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessProxyh">trunk/Source/WebKit2/UIProcess/WebProcessProxy.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (207345 => 207346)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-10-14 17:14:39 UTC (rev 207345)
+++ trunk/Source/WebKit2/ChangeLog        2016-10-14 18:06:47 UTC (rev 207346)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2016-10-14  Gavin Barraclough  &lt;barraclough@apple.com&gt;
+
+        Add API to restrict WebKit processes to background priority
+        https://bugs.webkit.org/show_bug.cgi?id=163363
+
+        Reviewed by Anders Carlson.
+
+        Add API on _WKProcessPoolConfiguration to flag a process pool as 'alwaysRunsAtBackgroundPriority'.
+        WebContent and Networking processes associated with that pool will only run a background priority,
+        when they otherwise would have run at foreground priority.
+
+        * UIProcess/API/APIProcessPoolConfiguration.h:
+            - Add m_alwaysRunsAtBackgroundPriority flag to pool configuration object.
+        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
+        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
+        (-[_WKProcessPoolConfiguration alwaysRunsAtBackgroundPriority]):
+        (-[_WKProcessPoolConfiguration setAlwaysRunsAtBackgroundPriority:]):
+            - Expose new configuration property through API.
+        * UIProcess/Network/NetworkProcessProxy.cpp:
+        (WebKit::NetworkProcessProxy::alwaysRunsAtBackgroundPriority):
+        * UIProcess/Network/NetworkProcessProxy.h:
+            - Support ProcessThrottlerClient interface to check if alwaysRunsAtBackgroundPriority is set.
+        * UIProcess/ProcessThrottler.cpp:
+        (WebKit::ProcessThrottler::assertionState):
+            - When determining whether to take a foreground exception check alwaysRunsAtBackgroundPriority.
+        * UIProcess/ProcessThrottlerClient.h:
+            - Add interface to access alwaysRunsAtBackgroundPriority state of WebProcess of NetworkProcess.
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::WebProcessPool::WebProcessPool):
+        * UIProcess/WebProcessPool.h:
+            - Add m_alwaysRunsAtBackgroundPriority, set by configuration.
+        * UIProcess/WebProcessProxy.cpp:
+        (WebKit::WebProcessProxy::alwaysRunsAtBackgroundPriority):
+        * UIProcess/WebProcessProxy.h:
+            - Support ProcessThrottlerClient interface to check if alwaysRunsAtBackgroundPriority is set.
+
</ins><span class="cx"> 2016-10-14  Youenn Fablet  &lt;youenn@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Make NetworkCache aware of fetch cache mode
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIProcessPoolConfigurationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.cpp (207345 => 207346)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.cpp        2016-10-14 17:14:39 UTC (rev 207345)
+++ trunk/Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.cpp        2016-10-14 18:06:47 UTC (rev 207346)
</span><span class="lines">@@ -113,6 +113,7 @@
</span><span class="cx">     copy-&gt;m_overrideLanguages = this-&gt;m_overrideLanguages;
</span><span class="cx">     copy-&gt;m_sourceApplicationBundleIdentifier = this-&gt;m_sourceApplicationBundleIdentifier;
</span><span class="cx">     copy-&gt;m_sourceApplicationSecondaryIdentifier = this-&gt;m_sourceApplicationSecondaryIdentifier;
</span><ins>+    copy-&gt;m_alwaysRunsAtBackgroundPriority = this-&gt;m_alwaysRunsAtBackgroundPriority;
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     copy-&gt;m_ctDataConnectionServiceType = this-&gt;m_ctDataConnectionServiceType;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIProcessPoolConfigurationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.h (207345 => 207346)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.h        2016-10-14 17:14:39 UTC (rev 207345)
+++ trunk/Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.h        2016-10-14 18:06:47 UTC (rev 207346)
</span><span class="lines">@@ -108,6 +108,9 @@
</span><span class="cx">     const WTF::String&amp; sourceApplicationSecondaryIdentifier() const { return m_sourceApplicationSecondaryIdentifier; }
</span><span class="cx">     void setSourceApplicationSecondaryIdentifier(const WTF::String&amp; sourceApplicationSecondaryIdentifier) { m_sourceApplicationSecondaryIdentifier = sourceApplicationSecondaryIdentifier; }
</span><span class="cx"> 
</span><ins>+    bool alwaysRunsAtBackgroundPriority() const { return m_alwaysRunsAtBackgroundPriority; }
+    void setAlwaysRunsAtBackgroundPriority(bool alwaysRunsAtBackgroundPriority) { m_alwaysRunsAtBackgroundPriority = alwaysRunsAtBackgroundPriority; }
+
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     const WTF::String&amp; ctDataConnectionServiceType() const { return m_ctDataConnectionServiceType; }
</span><span class="cx">     void setCTDataConnectionServiceType(const WTF::String&amp; ctDataConnectionServiceType) { m_ctDataConnectionServiceType = ctDataConnectionServiceType; }
</span><span class="lines">@@ -138,6 +141,7 @@
</span><span class="cx">     Vector&lt;WTF::String&gt; m_overrideLanguages;
</span><span class="cx">     WTF::String m_sourceApplicationBundleIdentifier;
</span><span class="cx">     WTF::String m_sourceApplicationSecondaryIdentifier;
</span><ins>+    bool m_alwaysRunsAtBackgroundPriority { false };
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     WTF::String m_ctDataConnectionServiceType;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoa_WKProcessPoolConfigurationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h (207345 => 207346)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h        2016-10-14 17:14:39 UTC (rev 207345)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h        2016-10-14 18:06:47 UTC (rev 207346)
</span><span class="lines">@@ -49,6 +49,7 @@
</span><span class="cx"> @property (nonatomic, nullable, copy) NSString *sourceApplicationSecondaryIdentifier WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
</span><span class="cx"> #if TARGET_OS_IPHONE
</span><span class="cx"> @property (nonatomic, nullable, copy) NSString *CTDataConnectionServiceType WK_API_AVAILABLE(ios(WK_IOS_TBA));
</span><ins>+@property (nonatomic) BOOL alwaysRunsAtBackgroundPriority WK_API_AVAILABLE(ios(WK_IOS_TBA));
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoa_WKProcessPoolConfigurationmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm (207345 => 207346)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm        2016-10-14 17:14:39 UTC (rev 207345)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm        2016-10-14 18:06:47 UTC (rev 207346)
</span><span class="lines">@@ -181,6 +181,16 @@
</span><span class="cx"> {
</span><span class="cx">     _processPoolConfiguration-&gt;setCTDataConnectionServiceType(ctDataConnectionServiceType);
</span><span class="cx"> }
</span><ins>+
+- (BOOL)alwaysRunsAtBackgroundPriority
+{
+    return _processPoolConfiguration-&gt;alwaysRunsAtBackgroundPriority();
+}
+
+- (void)setAlwaysRunsAtBackgroundPriority:(BOOL)alwaysRunsAtBackgroundPriority
+{
+    _processPoolConfiguration-&gt;setAlwaysRunsAtBackgroundPriority(alwaysRunsAtBackgroundPriority);
+}
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> - (NSString *)description
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkNetworkProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp (207345 => 207346)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp        2016-10-14 17:14:39 UTC (rev 207345)
+++ trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp        2016-10-14 18:06:47 UTC (rev 207346)
</span><span class="lines">@@ -390,6 +390,11 @@
</span><span class="cx">         send(Messages::NetworkProcess::ProcessDidResume(), 0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool NetworkProcessProxy::alwaysRunsAtBackgroundPriority()
+{
+    return m_processPool.alwaysRunsAtBackgroundPriority();
+}
+
</ins><span class="cx"> void NetworkProcessProxy::processReadyToSuspend()
</span><span class="cx"> {
</span><span class="cx">     m_throttler.processReadyToSuspend();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkNetworkProcessProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h (207345 => 207346)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h        2016-10-14 17:14:39 UTC (rev 207345)
+++ trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h        2016-10-14 18:06:47 UTC (rev 207346)
</span><span class="lines">@@ -91,6 +91,7 @@
</span><span class="cx">     void sendPrepareToSuspend() override;
</span><span class="cx">     void sendCancelPrepareToSuspend() override;
</span><span class="cx">     void sendProcessDidResume() override;
</span><ins>+    bool alwaysRunsAtBackgroundPriority() override;
</ins><span class="cx">     void didSetAssertionState(AssertionState) override;
</span><span class="cx"> 
</span><span class="cx">     // IPC::Connection::Client
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessProcessThrottlercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ProcessThrottler.cpp (207345 => 207346)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ProcessThrottler.cpp        2016-10-14 17:14:39 UTC (rev 207345)
+++ trunk/Source/WebKit2/UIProcess/ProcessThrottler.cpp        2016-10-14 18:06:47 UTC (rev 207346)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx">     ASSERT(!m_suspendTimer.isActive());
</span><span class="cx">     
</span><span class="cx">     if (m_foregroundCounter.value())
</span><del>-        return AssertionState::Foreground;
</del><ins>+        return m_process.alwaysRunsAtBackgroundPriority() ? AssertionState::Background : AssertionState::Foreground;
</ins><span class="cx">     if (m_backgroundCounter.value())
</span><span class="cx">         return AssertionState::Background;
</span><span class="cx">     return AssertionState::Suspended;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessProcessThrottlerClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ProcessThrottlerClient.h (207345 => 207346)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ProcessThrottlerClient.h        2016-10-14 17:14:39 UTC (rev 207345)
+++ trunk/Source/WebKit2/UIProcess/ProcessThrottlerClient.h        2016-10-14 18:06:47 UTC (rev 207346)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx">     virtual void sendPrepareToSuspend() = 0;
</span><span class="cx">     virtual void sendCancelPrepareToSuspend() = 0;
</span><span class="cx">     virtual void sendProcessDidResume() = 0;
</span><del>-
</del><ins>+    virtual bool alwaysRunsAtBackgroundPriority() = 0;
</ins><span class="cx">     virtual void didSetAssertionState(AssertionState) = 0;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessPoolcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp (207345 => 207346)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp        2016-10-14 17:14:39 UTC (rev 207345)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp        2016-10-14 18:06:47 UTC (rev 207346)
</span><span class="lines">@@ -177,6 +177,7 @@
</span><span class="cx">     , m_canHandleHTTPSServerTrustEvaluation(true)
</span><span class="cx">     , m_didNetworkProcessCrash(false)
</span><span class="cx">     , m_memoryCacheDisabled(false)
</span><ins>+    , m_alwaysRunsAtBackgroundPriority(m_configuration-&gt;alwaysRunsAtBackgroundPriority())
</ins><span class="cx">     , m_userObservablePageCounter([this](RefCounterEvent) { updateProcessSuppressionState(); })
</span><span class="cx">     , m_processSuppressionDisabledForPageCounter([this](RefCounterEvent) { updateProcessSuppressionState(); })
</span><span class="cx">     , m_hiddenPageThrottlingAutoIncreasesCounter([this](RefCounterEvent) { m_hiddenPageThrottlingTimer.startOneShot(0); })
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessPoolh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.h (207345 => 207346)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessPool.h        2016-10-14 17:14:39 UTC (rev 207345)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.h        2016-10-14 18:06:47 UTC (rev 207346)
</span><span class="lines">@@ -366,6 +366,8 @@
</span><span class="cx">     bool resourceLoadStatisticsEnabled() { return m_resourceLoadStatisticsEnabled; }
</span><span class="cx">     void setResourceLoadStatisticsEnabled(bool enabled) { m_resourceLoadStatisticsEnabled = enabled; }
</span><span class="cx"> 
</span><ins>+    bool alwaysRunsAtBackgroundPriority() { return m_alwaysRunsAtBackgroundPriority; }
+
</ins><span class="cx"> #if ENABLE(GAMEPAD)
</span><span class="cx">     void gamepadConnected(const UIGamepad&amp;);
</span><span class="cx">     void gamepadDisconnected(const UIGamepad&amp;);
</span><span class="lines">@@ -533,6 +535,8 @@
</span><span class="cx">     bool m_memoryCacheDisabled;
</span><span class="cx">     bool m_resourceLoadStatisticsEnabled { false };
</span><span class="cx"> 
</span><ins>+    bool m_alwaysRunsAtBackgroundPriority;
+
</ins><span class="cx">     UserObservablePageCounter m_userObservablePageCounter;
</span><span class="cx">     ProcessSuppressionDisabledCounter m_processSuppressionDisabledForPageCounter;
</span><span class="cx">     HiddenPageThrottlingAutoIncreasesCounter m_hiddenPageThrottlingAutoIncreasesCounter;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp (207345 => 207346)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp        2016-10-14 17:14:39 UTC (rev 207345)
+++ trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp        2016-10-14 18:06:47 UTC (rev 207346)
</span><span class="lines">@@ -927,6 +927,11 @@
</span><span class="cx">         send(Messages::WebProcess::ProcessDidResume(), 0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool WebProcessProxy::alwaysRunsAtBackgroundPriority()
+{
+    return m_processPool-&gt;alwaysRunsAtBackgroundPriority();
+}
+
</ins><span class="cx"> void WebProcessProxy::processReadyToSuspend()
</span><span class="cx"> {
</span><span class="cx">     m_throttler.processReadyToSuspend();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.h (207345 => 207346)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessProxy.h        2016-10-14 17:14:39 UTC (rev 207345)
+++ trunk/Source/WebKit2/UIProcess/WebProcessProxy.h        2016-10-14 18:06:47 UTC (rev 207346)
</span><span class="lines">@@ -208,6 +208,7 @@
</span><span class="cx">     void sendPrepareToSuspend() override;
</span><span class="cx">     void sendCancelPrepareToSuspend() override;
</span><span class="cx">     void sendProcessDidResume() override;
</span><ins>+    bool alwaysRunsAtBackgroundPriority() override;
</ins><span class="cx">     void didSetAssertionState(AssertionState) override;
</span><span class="cx"> 
</span><span class="cx">     // ProcessLauncher::Client
</span></span></pre>
</div>
</div>

</body>
</html>