<!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>[213444] trunk/Source</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/213444">213444</a></dd>
<dt>Author</dt> <dd>akling@apple.com</dd>
<dt>Date</dt> <dd>2017-03-06 02:02:09 -0800 (Mon, 06 Mar 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>[iOS] Report domains crashing under memory pressure via enhanced privacy logging.
<https://webkit.org/b/169133>
<rdar://problem/29964017>
Reviewed by Antti Koivisto.
Source/WebCore:
* page/DiagnosticLoggingKeys.h:
Source/WebKit2:
Notify the UI process when the memory pressure status changes.
If a web process crashes while under memory pressure, log the domain of the last open page
using enhanced privacy logging.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::processDidCrash):
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::memoryPressureStatusChanged):
(WebKit::WebProcessProxy::isUnderMemoryPressure):
* UIProcess/WebProcessProxy.messages.in:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
Source/WTF:
Add a mechanism for getting a callback when the memory pressure status changes.
* wtf/MemoryPressureHandler.cpp:
(WTF::MemoryPressureHandler::measurementTimerFired):
(WTF::MemoryPressureHandler::beginSimulatedMemoryPressure):
(WTF::MemoryPressureHandler::endSimulatedMemoryPressure):
(WTF::MemoryPressureHandler::setUnderMemoryPressure):
(WTF::MemoryPressureHandler::memoryPressureStatusChanged):
* wtf/MemoryPressureHandler.h:
(WTF::MemoryPressureHandler::setMemoryPressureStatusChangedCallback):
(WTF::MemoryPressureHandler::setUnderMemoryPressure): Deleted.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfMemoryPressureHandlercpp">trunk/Source/WTF/wtf/MemoryPressureHandler.cpp</a></li>
<li><a href="#trunkSourceWTFwtfMemoryPressureHandlerh">trunk/Source/WTF/wtf/MemoryPressureHandler.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepageDiagnosticLoggingKeysh">trunk/Source/WebCore/page/DiagnosticLoggingKeys.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessProxyh">trunk/Source/WebKit2/UIProcess/WebProcessProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessProxymessagesin">trunk/Source/WebKit2/UIProcess/WebProcessProxy.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebProcesscpp">trunk/Source/WebKit2/WebProcess/WebProcess.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (213443 => 213444)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2017-03-06 07:38:24 UTC (rev 213443)
+++ trunk/Source/WTF/ChangeLog        2017-03-06 10:02:09 UTC (rev 213444)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2017-03-06 Andreas Kling <akling@apple.com>
+
+ [iOS] Report domains crashing under memory pressure via enhanced privacy logging.
+ <https://webkit.org/b/169133>
+ <rdar://problem/29964017>
+
+ Reviewed by Antti Koivisto.
+
+ Add a mechanism for getting a callback when the memory pressure status changes.
+
+ * wtf/MemoryPressureHandler.cpp:
+ (WTF::MemoryPressureHandler::measurementTimerFired):
+ (WTF::MemoryPressureHandler::beginSimulatedMemoryPressure):
+ (WTF::MemoryPressureHandler::endSimulatedMemoryPressure):
+ (WTF::MemoryPressureHandler::setUnderMemoryPressure):
+ (WTF::MemoryPressureHandler::memoryPressureStatusChanged):
+ * wtf/MemoryPressureHandler.h:
+ (WTF::MemoryPressureHandler::setMemoryPressureStatusChangedCallback):
+ (WTF::MemoryPressureHandler::setUnderMemoryPressure): Deleted.
+
</ins><span class="cx"> 2017-03-03 Jer Noble <jer.noble@apple.com>
</span><span class="cx">
</span><span class="cx"> [Win64] '__int128_t': undeclared identifier in MediaTime.cpp
</span></span></pre></div>
<a id="trunkSourceWTFwtfMemoryPressureHandlercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/MemoryPressureHandler.cpp (213443 => 213444)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/MemoryPressureHandler.cpp        2017-03-06 07:38:24 UTC (rev 213443)
+++ trunk/Source/WTF/wtf/MemoryPressureHandler.cpp        2017-03-06 10:02:09 UTC (rev 213444)
</span><span class="lines">@@ -124,6 +124,7 @@
</span><span class="cx"> RELEASE_LOG(MemoryPressure, "Memory usage policy changed: %s -> %s", toString(m_memoryUsagePolicy), toString(newPolicy));
</span><span class="cx">
</span><span class="cx"> m_memoryUsagePolicy = newPolicy;
</span><ins>+ memoryPressureStatusChanged();
</ins><span class="cx">
</span><span class="cx"> if (newPolicy == MemoryUsagePolicy::Unrestricted)
</span><span class="cx"> return;
</span><span class="lines">@@ -159,6 +160,7 @@
</span><span class="cx"> if (footprint.value() < thresholdForPolicy(MemoryUsagePolicy::Panic)) {
</span><span class="cx"> m_memoryUsagePolicy = policyForFootprint(footprint.value());
</span><span class="cx"> RELEASE_LOG(MemoryPressure, "Pressure reduced below panic threshold. New memory usage policy: %s", toString(m_memoryUsagePolicy));
</span><ins>+ memoryPressureStatusChanged();
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -168,13 +170,19 @@
</span><span class="cx">
</span><span class="cx"> void MemoryPressureHandler::beginSimulatedMemoryPressure()
</span><span class="cx"> {
</span><ins>+ if (m_isSimulatingMemoryPressure)
+ return;
</ins><span class="cx"> m_isSimulatingMemoryPressure = true;
</span><ins>+ memoryPressureStatusChanged();
</ins><span class="cx"> respondToMemoryPressure(Critical::Yes, Synchronous::Yes);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void MemoryPressureHandler::endSimulatedMemoryPressure()
</span><span class="cx"> {
</span><ins>+ if (!m_isSimulatingMemoryPressure)
+ return;
</ins><span class="cx"> m_isSimulatingMemoryPressure = false;
</span><ins>+ memoryPressureStatusChanged();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void MemoryPressureHandler::releaseMemory(Critical critical, Synchronous synchronous)
</span><span class="lines">@@ -187,6 +195,20 @@
</span><span class="cx"> platformReleaseMemory(critical);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void MemoryPressureHandler::setUnderMemoryPressure(bool underMemoryPressure)
+{
+ if (m_underMemoryPressure == underMemoryPressure)
+ return;
+ m_underMemoryPressure = underMemoryPressure;
+ memoryPressureStatusChanged();
+}
+
+void MemoryPressureHandler::memoryPressureStatusChanged()
+{
+ if (m_memoryPressureStatusChangedCallback)
+ m_memoryPressureStatusChangedCallback(isUnderMemoryPressure());
+}
+
</ins><span class="cx"> void MemoryPressureHandler::ReliefLogger::logMemoryUsageChange()
</span><span class="cx"> {
</span><span class="cx"> #if !RELEASE_LOG_DISABLED
</span></span></pre></div>
<a id="trunkSourceWTFwtfMemoryPressureHandlerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/MemoryPressureHandler.h (213443 => 213444)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/MemoryPressureHandler.h        2017-03-06 07:38:24 UTC (rev 213443)
+++ trunk/Source/WTF/wtf/MemoryPressureHandler.h        2017-03-06 10:02:09 UTC (rev 213444)
</span><span class="lines">@@ -68,6 +68,7 @@
</span><span class="cx">
</span><span class="cx"> void setMemoryKillCallback(WTF::Function<void()> function) { m_memoryKillCallback = WTFMove(function); }
</span><span class="cx"> void setProcessIsEligibleForMemoryKillCallback(WTF::Function<bool()> function) { m_processIsEligibleForMemoryKillCallback = WTFMove(function); }
</span><ins>+ void setMemoryPressureStatusChangedCallback(WTF::Function<void(bool)> function) { m_memoryPressureStatusChangedCallback = WTFMove(function); }
</ins><span class="cx">
</span><span class="cx"> void setLowMemoryHandler(LowMemoryHandler&& handler)
</span><span class="cx"> {
</span><span class="lines">@@ -82,7 +83,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> || m_isSimulatingMemoryPressure;
</span><span class="cx"> }
</span><del>- void setUnderMemoryPressure(bool b) { m_underMemoryPressure = b; }
</del><ins>+ void setUnderMemoryPressure(bool);
</ins><span class="cx">
</span><span class="cx"> #if OS(LINUX)
</span><span class="cx"> void setMemoryPressureMonitorHandle(int fd);
</span><span class="lines">@@ -140,6 +141,8 @@
</span><span class="cx"> WTF_EXPORT_PRIVATE void endSimulatedMemoryPressure();
</span><span class="cx">
</span><span class="cx"> private:
</span><ins>+ void memoryPressureStatusChanged();
+
</ins><span class="cx"> void uninstall();
</span><span class="cx">
</span><span class="cx"> void holdOff(unsigned);
</span><span class="lines">@@ -184,9 +187,8 @@
</span><span class="cx"> MemoryUsagePolicy m_memoryUsagePolicy { MemoryUsagePolicy::Unrestricted };
</span><span class="cx"> WTF::Function<void()> m_memoryKillCallback;
</span><span class="cx"> WTF::Function<bool()> m_processIsEligibleForMemoryKillCallback;
</span><ins>+ WTF::Function<void(bool)> m_memoryPressureStatusChangedCallback;
</ins><span class="cx">
</span><del>- WTFLogChannel m_logChannel;
-
</del><span class="cx"> #if OS(WINDOWS)
</span><span class="cx"> void windowsMeasurementTimerFired();
</span><span class="cx"> RunLoop::Timer<MemoryPressureHandler> m_windowsMeasurementTimer;
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (213443 => 213444)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-03-06 07:38:24 UTC (rev 213443)
+++ trunk/Source/WebCore/ChangeLog        2017-03-06 10:02:09 UTC (rev 213444)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2017-03-06 Andreas Kling <akling@apple.com>
+
+ [iOS] Report domains crashing under memory pressure via enhanced privacy logging.
+ <https://webkit.org/b/169133>
+ <rdar://problem/29964017>
+
+ Reviewed by Antti Koivisto.
+
+ * page/DiagnosticLoggingKeys.h:
+
</ins><span class="cx"> 2017-03-05 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><span class="cx"> Avoid backing store for layers with empty text nodes in a few more cases
</span></span></pre></div>
<a id="trunkSourceWebCorepageDiagnosticLoggingKeysh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DiagnosticLoggingKeys.h (213443 => 213444)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DiagnosticLoggingKeys.h        2017-03-06 07:38:24 UTC (rev 213443)
+++ trunk/Source/WebCore/page/DiagnosticLoggingKeys.h        2017-03-06 10:02:09 UTC (rev 213444)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx"> static String diskCacheAfterValidationKey();
</span><span class="cx"> static String documentLoaderStoppingKey();
</span><span class="cx"> static String domainCausingEnergyDrainKey();
</span><del>- static String domainCausingJetsamKey();
</del><ins>+ WEBCORE_EXPORT static String domainCausingJetsamKey();
</ins><span class="cx"> static String domainVisitedKey();
</span><span class="cx"> static String engineFailedToLoadKey();
</span><span class="cx"> WEBCORE_EXPORT static String entryRightlyNotWarmedUpKey();
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (213443 => 213444)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2017-03-06 07:38:24 UTC (rev 213443)
+++ trunk/Source/WebKit2/ChangeLog        2017-03-06 10:02:09 UTC (rev 213444)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2017-03-06 Andreas Kling <akling@apple.com>
+
+ [iOS] Report domains crashing under memory pressure via enhanced privacy logging.
+ <https://webkit.org/b/169133>
+ <rdar://problem/29964017>
+
+ Reviewed by Antti Koivisto.
+
+ Notify the UI process when the memory pressure status changes.
+ If a web process crashes while under memory pressure, log the domain of the last open page
+ using enhanced privacy logging.
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::processDidCrash):
+ * UIProcess/WebProcessProxy.h:
+ (WebKit::WebProcessProxy::memoryPressureStatusChanged):
+ (WebKit::WebProcessProxy::isUnderMemoryPressure):
+ * UIProcess/WebProcessProxy.messages.in:
+ * WebProcess/WebProcess.cpp:
+ (WebKit::WebProcess::initializeWebProcess):
+
</ins><span class="cx"> 2017-03-05 Brady Eidson <beidson@apple.com>
</span><span class="cx">
</span><span class="cx"> Remove new files accidentally added in r213441
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (213443 => 213444)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2017-03-06 07:38:24 UTC (rev 213443)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2017-03-06 10:02:09 UTC (rev 213444)
</span><span class="lines">@@ -112,6 +112,7 @@
</span><span class="cx"> #include "WebsiteDataStore.h"
</span><span class="cx"> #include <WebCore/BitmapImage.h>
</span><span class="cx"> #include <WebCore/DiagnosticLoggingClient.h>
</span><ins>+#include <WebCore/DiagnosticLoggingKeys.h>
</ins><span class="cx"> #include <WebCore/DragController.h>
</span><span class="cx"> #include <WebCore/DragData.h>
</span><span class="cx"> #include <WebCore/EventNames.h>
</span><span class="lines">@@ -120,6 +121,7 @@
</span><span class="cx"> #include <WebCore/JSDOMBinding.h>
</span><span class="cx"> #include <WebCore/JSDOMExceptionHandling.h>
</span><span class="cx"> #include <WebCore/MIMETypeRegistry.h>
</span><ins>+#include <WebCore/PublicSuffix.h>
</ins><span class="cx"> #include <WebCore/RenderEmbeddedObject.h>
</span><span class="cx"> #include <WebCore/SerializedCryptoKeyWrap.h>
</span><span class="cx"> #include <WebCore/TextCheckerClient.h>
</span><span class="lines">@@ -5283,6 +5285,17 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(m_isValid);
</span><span class="cx">
</span><ins>+#if PLATFORM(IOS)
+ if (m_process->isUnderMemoryPressure()) {
+ String url = m_pageLoadState.activeURL();
+ if (url.isEmpty() && m_backForwardList->currentItem())
+ url = m_backForwardList->currentItem()->url();
+ String domain = WebCore::topPrivatelyControlledDomain(WebCore::URL(WebCore::ParsedURLString, url).host());
+ if (!domain.isEmpty())
+ logDiagnosticMessageWithEnhancedPrivacy(WebCore::DiagnosticLoggingKeys::domainCausingJetsamKey(), domain, WebCore::ShouldSample::No);
+ }
+#endif
+
</ins><span class="cx"> // There is a nested transaction in resetStateAfterProcessExited() that we don't want to commit before the client call.
</span><span class="cx"> PageLoadState::Transaction transaction = m_pageLoadState.transaction();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.h (213443 => 213444)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessProxy.h        2017-03-06 07:38:24 UTC (rev 213443)
+++ trunk/Source/WebKit2/UIProcess/WebProcessProxy.h        2017-03-06 10:02:09 UTC (rev 213444)
</span><span class="lines">@@ -158,6 +158,9 @@
</span><span class="cx"> void isResponsive(std::function<void(bool isWebProcessResponsive)>);
</span><span class="cx"> void didReceiveMainThreadPing();
</span><span class="cx">
</span><ins>+ void memoryPressureStatusChanged(bool isUnderMemoryPressure) { m_isUnderMemoryPressure = isUnderMemoryPressure; }
+ bool isUnderMemoryPressure() const { return m_isUnderMemoryPressure; }
+
</ins><span class="cx"> private:
</span><span class="cx"> explicit WebProcessProxy(WebProcessPool&, WebsiteDataStore*);
</span><span class="cx">
</span><span class="lines">@@ -263,6 +266,8 @@
</span><span class="cx">
</span><span class="cx"> // FIXME: WebsiteDataStores should be made per-WebPageProxy throughout WebKit2. Get rid of this member.
</span><span class="cx"> RefPtr<WebsiteDataStore> m_websiteDataStore;
</span><ins>+
+ bool m_isUnderMemoryPressure { false };
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.messages.in (213443 => 213444)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessProxy.messages.in        2017-03-06 07:38:24 UTC (rev 213443)
+++ trunk/Source/WebKit2/UIProcess/WebProcessProxy.messages.in        2017-03-06 10:02:09 UTC (rev 213444)
</span><span class="lines">@@ -49,4 +49,6 @@
</span><span class="cx"> ReleaseIconForPageURL(String pageURL)
</span><span class="cx">
</span><span class="cx"> DidReceiveMainThreadPing()
</span><ins>+
+ MemoryPressureStatusChanged(bool isUnderMemoryPressure)
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (213443 => 213444)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2017-03-06 07:38:24 UTC (rev 213443)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2017-03-06 10:02:09 UTC (rev 213444)
</span><span class="lines">@@ -270,6 +270,10 @@
</span><span class="cx"> return WebCore::processIsEligibleForMemoryKill();
</span><span class="cx"> });
</span><span class="cx"> #endif
</span><ins>+ memoryPressureHandler.setMemoryPressureStatusChangedCallback([this](bool isUnderMemoryPressure) {
+ if (parentProcessConnection())
+ parentProcessConnection()->send(Messages::WebProcessProxy::MemoryPressureStatusChanged(isUnderMemoryPressure), 0);
+ });
</ins><span class="cx"> memoryPressureHandler.install();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>