<!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>[185273] 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/185273">185273</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2015-06-05 16:20:06 -0700 (Fri, 05 Jun 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>[WK2][iOS] Limit the number of vnodes used by the WebContent processes
https://bugs.webkit.org/show_bug.cgi?id=145672
&lt;rdar://problem/21126637&gt;

Reviewed by Antti Koivisto.

Source/WebCore:

Limit the number of vnodes used by the WebContent processes to reduce
the chance of getting killed due to the system running out of vnodes.
We sometimes see the WebContent process use up to 50% of the system's
vnode limit on some tests on iOS, which seems excessive. Most vnodes
are due to CachedResources which are mmap'd from the WebKit disk cache
and kept alive due to caches such as the Memory Cache / PageCache.

This patch adds tracking for the number of SharedBuffer objects that are
backed by a CFDataRef as this should track most of the vnodes used by
the process. The WebContent process registers a vnode pressure handler
upon initialization (likely it already does for memory pressure
handling). This handler gets called when the process uses over 15% of
of system's vnode limit and the &quot;critical&quot; flag is set if it uses over
20% of the system limit. The vnode pressure handler currently calls the
memory pressure handler as freeing our caches (especially PageCache,
MemoryCache) and doing a JS GC frees up vnodes.

On iPhone 6 Plus, the system limit is at 3000, which would lead to the
following limits being used:
soft: 450 / hard: 600

However, on older hardware, the system limit can be as low as 2000,
which would lead to the following limits being used:
soft: 300 / hard: 400

vnode tracking is currently only enabled on iOS because system vnode
limits are usually much higher on Mac (e.g. 473695 on Mac Pro, 9984
on a 2011 MacBook Air) and we normally don't get killed.

* WebCore.xcodeproj/project.pbxproj:

Add new files to the XCode project.

* platform/SharedBuffer.h:

Add a VNodeTracker::Token member next to the CFDataRef member that we
initialize if the SharedBuffer is constructed from a CFDataRef.

* platform/VNodeTracker.cpp: Added.
(WebCore::VNodeTracker::singleton):
(WebCore::VNodeTracker::VNodeTracker):
(WebCore::VNodeTracker::checkPressureState):
(WebCore::VNodeTracker::pressureWarningTimerFired):
(WebCore::VNodeTracker::nextPressureWarningInterval):
(WebCore::VNodeTracker::platformInitialize):
* platform/VNodeTracker.h: Added.
(WebCore::VNodeTracker::setPressureHandler):

Add a new VNodeTracker singleton to keep track the number of vnodes
used by the process since the system does not issue warnings before
reaching its vnode limit. Call sites should request Tokens for
every vnode they use for tracking purposes. Each process can then
set a vnode pressure handler function that will be called when the
process is over the designated limits.

* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::SharedBuffer):

Take a VNodeToken from the VNodeTracker when constructing the
SharedBuffer from a CFDataRef as these usually use mmap.

* platform/cocoa/VNodeTrackerCocoa.cpp: Added.
(WebCore::VNodeTracker::platformInitialize):

Get the system's vnode limit and uses 15% of that value as soft
limit for the process and 20% of that value as hard limit.

Source/WebKit2:

Have the WebContent process register a vnode pressure handler on iOS,
which calls the memory pressure handler.

On non-critical pressure, it will prune dead resources from the memory
cache, which should free up some vnodes. On critical pressure, the
handler will clear the PageCache and do a JS GC, which should free even
more vnodes.

* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Source/WTF:

* wtf/RefCounter.h:
(WTF::RefCounter::value):

Expose the actual refcount instead of a boolean value.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfRefCounterh">trunk/Source/WTF/wtf/RefCounter.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreplatformSharedBufferh">trunk/Source/WebCore/platform/SharedBuffer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformcfSharedBufferCFcpp">trunk/Source/WebCore/platform/cf/SharedBufferCF.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcesscocoaWebProcessCocoamm">trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformVNodeTrackercpp">trunk/Source/WebCore/platform/VNodeTracker.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformVNodeTrackerh">trunk/Source/WebCore/platform/VNodeTracker.h</a></li>
<li><a href="#trunkSourceWebCoreplatformcocoaVNodeTrackerCocoacpp">trunk/Source/WebCore/platform/cocoa/VNodeTrackerCocoa.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (185272 => 185273)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2015-06-05 23:16:26 UTC (rev 185272)
+++ trunk/Source/WTF/ChangeLog        2015-06-05 23:20:06 UTC (rev 185273)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2015-06-05  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        [WK2][iOS] Limit the number of vnodes used by the WebContent processes
+        https://bugs.webkit.org/show_bug.cgi?id=145672
+        &lt;rdar://problem/21126637&gt;
+
+        Reviewed by Antti Koivisto.
+
+        * wtf/RefCounter.h:
+        (WTF::RefCounter::value):
+
+        Expose the actual refcount instead of a boolean value.
+
</ins><span class="cx"> 2015-06-05  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         [Web Timing] Use new SPI to enable data collection.
</span></span></pre></div>
<a id="trunkSourceWTFwtfRefCounterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/RefCounter.h (185272 => 185273)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/RefCounter.h        2015-06-05 23:16:26 UTC (rev 185272)
+++ trunk/Source/WTF/wtf/RefCounter.h        2015-06-05 23:20:06 UTC (rev 185273)
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx">         return Token&lt;T&gt;(m_count);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    bool value() const
</del><ins>+    unsigned value() const
</ins><span class="cx">     {
</span><span class="cx">         return m_count-&gt;m_value;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (185272 => 185273)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-06-05 23:16:26 UTC (rev 185272)
+++ trunk/Source/WebCore/ChangeLog        2015-06-05 23:20:06 UTC (rev 185273)
</span><span class="lines">@@ -1,3 +1,78 @@
</span><ins>+2015-06-05  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        [WK2][iOS] Limit the number of vnodes used by the WebContent processes
+        https://bugs.webkit.org/show_bug.cgi?id=145672
+        &lt;rdar://problem/21126637&gt;
+
+        Reviewed by Antti Koivisto.
+
+        Limit the number of vnodes used by the WebContent processes to reduce
+        the chance of getting killed due to the system running out of vnodes.
+        We sometimes see the WebContent process use up to 50% of the system's
+        vnode limit on some tests on iOS, which seems excessive. Most vnodes
+        are due to CachedResources which are mmap'd from the WebKit disk cache
+        and kept alive due to caches such as the Memory Cache / PageCache.
+
+        This patch adds tracking for the number of SharedBuffer objects that are
+        backed by a CFDataRef as this should track most of the vnodes used by
+        the process. The WebContent process registers a vnode pressure handler
+        upon initialization (likely it already does for memory pressure
+        handling). This handler gets called when the process uses over 15% of
+        of system's vnode limit and the &quot;critical&quot; flag is set if it uses over
+        20% of the system limit. The vnode pressure handler currently calls the
+        memory pressure handler as freeing our caches (especially PageCache,
+        MemoryCache) and doing a JS GC frees up vnodes.
+
+        On iPhone 6 Plus, the system limit is at 3000, which would lead to the
+        following limits being used:
+        soft: 450 / hard: 600
+
+        However, on older hardware, the system limit can be as low as 2000,
+        which would lead to the following limits being used:
+        soft: 300 / hard: 400
+
+        vnode tracking is currently only enabled on iOS because system vnode
+        limits are usually much higher on Mac (e.g. 473695 on Mac Pro, 9984
+        on a 2011 MacBook Air) and we normally don't get killed.
+
+        * WebCore.xcodeproj/project.pbxproj:
+
+        Add new files to the XCode project.
+
+        * platform/SharedBuffer.h:
+
+        Add a VNodeTracker::Token member next to the CFDataRef member that we
+        initialize if the SharedBuffer is constructed from a CFDataRef.
+
+        * platform/VNodeTracker.cpp: Added.
+        (WebCore::VNodeTracker::singleton):
+        (WebCore::VNodeTracker::VNodeTracker):
+        (WebCore::VNodeTracker::checkPressureState):
+        (WebCore::VNodeTracker::pressureWarningTimerFired):
+        (WebCore::VNodeTracker::nextPressureWarningInterval):
+        (WebCore::VNodeTracker::platformInitialize):
+        * platform/VNodeTracker.h: Added.
+        (WebCore::VNodeTracker::setPressureHandler):
+
+        Add a new VNodeTracker singleton to keep track the number of vnodes
+        used by the process since the system does not issue warnings before
+        reaching its vnode limit. Call sites should request Tokens for
+        every vnode they use for tracking purposes. Each process can then
+        set a vnode pressure handler function that will be called when the
+        process is over the designated limits.
+
+        * platform/cf/SharedBufferCF.cpp:
+        (WebCore::SharedBuffer::SharedBuffer):
+
+        Take a VNodeToken from the VNodeTracker when constructing the
+        SharedBuffer from a CFDataRef as these usually use mmap.
+
+        * platform/cocoa/VNodeTrackerCocoa.cpp: Added.
+        (WebCore::VNodeTracker::platformInitialize):
+
+        Get the system's vnode limit and uses 15% of that value as soft
+        limit for the process and 20% of that value as hard limit.
+
</ins><span class="cx"> 2015-06-05  Dean Jackson  &lt;dino@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Lingering checkbox animations when rapidly switching between views on WK1
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (185272 => 185273)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-06-05 23:16:26 UTC (rev 185272)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-06-05 23:20:06 UTC (rev 185273)
</span><span class="lines">@@ -8022,6 +8022,7 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\Timer.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\UserActivity.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\UUID.cpp&quot; /&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\platform\VNodeTracker.cpp&quot; /&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\platform\Widget.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\soup\SharedBufferSoup.cpp&quot;&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="lines">@@ -19925,6 +19926,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\ThreadTimers.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\Timer.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\UserActivity.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\platform\VNodeTracker.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\platform\HysteresisActivity.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\UUID.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\Widget.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (185272 => 185273)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2015-06-05 23:16:26 UTC (rev 185272)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2015-06-05 23:20:06 UTC (rev 185273)
</span><span class="lines">@@ -1185,6 +1185,9 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\UUID.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\platform\VNodeTracker.cpp&quot;&gt;
+      &lt;Filter&gt;platform&lt;/Filter&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\platform\Widget.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (185272 => 185273)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-06-05 23:16:26 UTC (rev 185272)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-06-05 23:20:06 UTC (rev 185273)
</span><span class="lines">@@ -1649,7 +1649,10 @@
</span><span class="cx">                 4689F1AF1267BAE100E8D380 /* FileMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = 4689F1AE1267BAE100E8D380 /* FileMetadata.h */; };
</span><span class="cx">                 46C83EFD1A9BBE2900A79A41 /* GeoNotifier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46C83EFB1A9BBE2900A79A41 /* GeoNotifier.cpp */; };
</span><span class="cx">                 46C83EFE1A9BBE2900A79A41 /* GeoNotifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 46C83EFC1A9BBE2900A79A41 /* GeoNotifier.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                46DB7D571B20FE46005651B2 /* VNodeTrackerCocoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46DB7D561B20FE3C005651B2 /* VNodeTrackerCocoa.cpp */; };
</ins><span class="cx">                 46DBB6501AB8C96F00D9A813 /* PowerObserverMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 46DBB64E1AB8C96F00D9A813 /* PowerObserverMac.h */; };
</span><ins>+                46F3E3F91B2109000087ED13 /* VNodeTracker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46DB7D581B20FE58005651B2 /* VNodeTracker.cpp */; };
+                46F3E3FA1B2109100087ED13 /* VNodeTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 46DB7D591B20FE58005651B2 /* VNodeTracker.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 46FCB6181A70820E00C5A21E /* DiagnosticLoggingKeys.h in Headers */ = {isa = PBXBuildFile; fileRef = CD37B37515C1A7E1006DC898 /* DiagnosticLoggingKeys.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 490707E61219C04300D90E51 /* ANGLEWebKitBridge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 490707E41219C04300D90E51 /* ANGLEWebKitBridge.cpp */; };
</span><span class="cx">                 490707E71219C04300D90E51 /* ANGLEWebKitBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 490707E51219C04300D90E51 /* ANGLEWebKitBridge.h */; };
</span><span class="lines">@@ -8836,6 +8839,9 @@
</span><span class="cx">                 4689F1AE1267BAE100E8D380 /* FileMetadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileMetadata.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 46C83EFB1A9BBE2900A79A41 /* GeoNotifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeoNotifier.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 46C83EFC1A9BBE2900A79A41 /* GeoNotifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeoNotifier.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                46DB7D561B20FE3C005651B2 /* VNodeTrackerCocoa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VNodeTrackerCocoa.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                46DB7D581B20FE58005651B2 /* VNodeTracker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VNodeTracker.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                46DB7D591B20FE58005651B2 /* VNodeTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VNodeTracker.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 46DBB64E1AB8C96F00D9A813 /* PowerObserverMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PowerObserverMac.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 490707E41219C04300D90E51 /* ANGLEWebKitBridge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ANGLEWebKitBridge.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 490707E51219C04300D90E51 /* ANGLEWebKitBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANGLEWebKitBridge.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -18982,6 +18988,7 @@
</span><span class="cx">                                 5D5975B119635F1100D00878 /* SystemVersion.h */,
</span><span class="cx">                                 5D5975B219635F1100D00878 /* SystemVersion.mm */,
</span><span class="cx">                                 7CC564B918BAC720001B9652 /* TelephoneNumberDetectorCocoa.cpp */,
</span><ins>+                                46DB7D561B20FE3C005651B2 /* VNodeTrackerCocoa.cpp */,
</ins><span class="cx">                         );
</span><span class="cx">                         path = cocoa;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -21908,6 +21915,8 @@
</span><span class="cx">                                 868160D2187669C40021E79D /* UserActivity.h */,
</span><span class="cx">                                 2E3BBF051162DA1100B9409A /* UUID.cpp */,
</span><span class="cx">                                 2E3BBF061162DA1100B9409A /* UUID.h */,
</span><ins>+                                46DB7D581B20FE58005651B2 /* VNodeTracker.cpp */,
+                                46DB7D591B20FE58005651B2 /* VNodeTracker.h */,
</ins><span class="cx">                                 9A1142031832D134000BB8AD /* ValueToString.h */,
</span><span class="cx">                                 9380F47109A11AB4001FDB34 /* Widget.cpp */,
</span><span class="cx">                                 9380F47209A11AB4001FDB34 /* Widget.h */,
</span><span class="lines">@@ -24717,6 +24726,7 @@
</span><span class="cx">                                 A74BB76B13BDA86300FF7BF0 /* ExceptionCodePlaceholder.h in Headers */,
</span><span class="cx">                                 148AFDA50AF58360008CC700 /* ExceptionHandlers.h in Headers */,
</span><span class="cx">                                 9767CE0B145ABC13005E64DB /* ExceptionHeaders.h in Headers */,
</span><ins>+                                46F3E3FA1B2109100087ED13 /* VNodeTracker.h in Headers */,
</ins><span class="cx">                                 9767CE0C145ABC13005E64DB /* ExceptionInterfaces.h in Headers */,
</span><span class="cx">                                 6E67D2A91280E8BD008758F7 /* Extensions3D.h in Headers */,
</span><span class="cx">                                 6E67D2A71280E8A4008758F7 /* Extensions3DOpenGL.h in Headers */,
</span><span class="lines">@@ -27744,6 +27754,7 @@
</span><span class="cx">                                 070584FF17F9F05E005F2BCB /* CapabilityRange.cpp in Sources */,
</span><span class="cx">                                 072CA86116CB4DC3008AE131 /* CaptionUserPreferences.cpp in Sources */,
</span><span class="cx">                                 079D086C162F21F900DB8658 /* CaptionUserPreferencesMediaAF.cpp in Sources */,
</span><ins>+                                46F3E3F91B2109000087ED13 /* VNodeTracker.cpp in Sources */,
</ins><span class="cx">                                 99CC0B4E18BE9849006CEBCC /* CapturingInputCursor.cpp in Sources */,
</span><span class="cx">                                 CDC734141977896C0046BFC5 /* CARingBuffer.cpp in Sources */,
</span><span class="cx">                                 6550B69D099DF0270090D781 /* CDATASection.cpp in Sources */,
</span><span class="lines">@@ -27931,6 +27942,7 @@
</span><span class="cx">                                 371F53EA0D2704F900ECE0D5 /* CSSUnicodeRangeValue.cpp in Sources */,
</span><span class="cx">                                 AD03AAFA1468455300A39B5B /* CSSValue.cpp in Sources */,
</span><span class="cx">                                 1ABA76CB11D20E57004C201C /* CSSValueKeywords.cpp in Sources */,
</span><ins>+                                46DB7D571B20FE46005651B2 /* VNodeTrackerCocoa.cpp in Sources */,
</ins><span class="cx">                                 A80E6CE40A1989CA007FB8C5 /* CSSValueList.cpp in Sources */,
</span><span class="cx">                                 E49BDA0B131FD3E5003C56F0 /* CSSValuePool.cpp in Sources */,
</span><span class="cx">                                 E11AF15111B9A1A300805103 /* Cursor.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformSharedBufferh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/SharedBuffer.h (185272 => 185273)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/SharedBuffer.h        2015-06-05 23:16:26 UTC (rev 185272)
+++ trunk/Source/WebCore/platform/SharedBuffer.h        2015-06-05 23:20:06 UTC (rev 185273)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> 
</span><span class="cx"> #if USE(CF)
</span><ins>+#include &quot;VNodeTracker.h&quot;
</ins><span class="cx"> #include &lt;wtf/RetainPtr.h&gt;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -167,6 +168,7 @@
</span><span class="cx"> #if USE(CF)
</span><span class="cx">     explicit SharedBuffer(CFDataRef);
</span><span class="cx">     RetainPtr&lt;CFDataRef&gt; m_cfData;
</span><ins>+    VNodeTracker::Token m_vnodeToken;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if USE(SOUP)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformVNodeTrackercpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/VNodeTracker.cpp (0 => 185273)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/VNodeTracker.cpp                                (rev 0)
+++ trunk/Source/WebCore/platform/VNodeTracker.cpp        2015-06-05 23:20:06 UTC (rev 185273)
</span><span class="lines">@@ -0,0 +1,91 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;VNodeTracker.h&quot;
+
+#include &quot;Logging.h&quot;
+#include &lt;wtf/NeverDestroyed.h&gt;
+#include &lt;wtf/RunLoop.h&gt;
+
+namespace WebCore {
+
+VNodeTracker&amp; VNodeTracker::singleton()
+{
+    static NeverDestroyed&lt;VNodeTracker&gt; vnodeTracker;
+    return vnodeTracker;
+}
+
+VNodeTracker::VNodeTracker()
+    : m_pressureWarningTimer(*this, &amp;VNodeTracker::pressureWarningTimerFired)
+    , m_lastWarningTime(std::chrono::steady_clock::now())
+{
+    platformInitialize();
+
+    LOG(MemoryPressure, &quot;Using following vnode limits for this process: soft=%u, hard=%u&quot;, m_softVNodeLimit, m_hardVNodeLimit);
+}
+
+void VNodeTracker::checkPressureState()
+{
+    ASSERT(m_pressureHandler);
+
+    if (m_vnodeCounter.value() &lt;= m_softVNodeLimit)
+        return;
+
+    if (!m_pressureWarningTimer.isActive())
+        m_pressureWarningTimer.startOneShot(nextPressureWarningInterval());
+}
+
+void VNodeTracker::pressureWarningTimerFired()
+{
+    if (m_vnodeCounter.value() &lt;= m_softVNodeLimit)
+        return;
+
+    m_lastWarningTime = std::chrono::steady_clock::now();
+    unsigned vnodeCount = m_vnodeCounter.value();
+    auto critical = vnodeCount &gt; m_hardVNodeLimit ? Critical::Yes : Critical::No;
+    m_pressureHandler(critical);
+    LOG(MemoryPressure, &quot;vnode pressure handler freed %d vnodes out of %u (critical pressure: %s)&quot;, vnodeCount - m_vnodeCounter.value(), vnodeCount, critical == Critical::Yes ? &quot;Yes&quot; : &quot;No&quot;);
+}
+
+std::chrono::milliseconds VNodeTracker::nextPressureWarningInterval() const
+{
+    // We run the vnode pressure handler every 30 seconds at most.
+    static const auto minimumWarningInterval = std::chrono::seconds { 30 };
+    auto timeSinceLastWarning = std::chrono::steady_clock::now() - m_lastWarningTime;
+    if (timeSinceLastWarning &lt; minimumWarningInterval)
+        return std::chrono::duration_cast&lt;std::chrono::milliseconds&gt;(minimumWarningInterval - timeSinceLastWarning);
+    return std::chrono::milliseconds { 0 };
+}
+
+#if !PLATFORM(COCOA)
+
+void VNodeTracker::platformInitialize()
+{
+}
+
+#endif
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformVNodeTrackerh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/VNodeTracker.h (0 => 185273)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/VNodeTracker.h                                (rev 0)
+++ trunk/Source/WebCore/platform/VNodeTracker.h        2015-06-05 23:20:06 UTC (rev 185273)
</span><span class="lines">@@ -0,0 +1,84 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef VNodeTracker_h
+#define VNodeTracker_h
+
+#include &quot;MemoryPressureHandler.h&quot;
+#include &quot;Timer.h&quot;
+#include &lt;chrono&gt;
+#include &lt;wtf/Forward.h&gt;
+#include &lt;wtf/RefCounter.h&gt;
+
+namespace WebCore {
+
+class VNodeTracker {
+    friend class WTF::NeverDestroyed&lt;VNodeTracker&gt;;
+public:
+    using PressureHandler = std::function&lt;void(Critical)&gt;;
+
+    enum TokenType { };
+    using Token = RefCounter::Token&lt;TokenType&gt;;
+
+    WEBCORE_EXPORT static VNodeTracker&amp; singleton();
+
+    void setPressureHandler(PressureHandler);
+    Token token();
+
+private:
+    VNodeTracker();
+
+    void checkPressureState();
+    void pressureWarningTimerFired();
+    std::chrono::milliseconds nextPressureWarningInterval() const;
+
+    void platformInitialize();
+
+    unsigned m_hardVNodeLimit { 400 };
+    unsigned m_softVNodeLimit { 300 };
+    PressureHandler m_pressureHandler;
+    RefCounter m_vnodeCounter;
+    Timer m_pressureWarningTimer;
+    std::chrono::time_point&lt;std::chrono::steady_clock&gt; m_lastWarningTime;
+};
+
+inline void VNodeTracker::setPressureHandler(PressureHandler handler)
+{
+    m_pressureHandler = handler;
+}
+
+inline auto VNodeTracker::token() -&gt; Token
+{
+    if (!m_pressureHandler)
+        return Token();
+
+    Token token(m_vnodeCounter.token&lt;TokenType&gt;());
+    checkPressureState();
+    return token;
+}
+
+} // namespace WebCore
+
+#endif // VNodeTracker_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformcfSharedBufferCFcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/cf/SharedBufferCF.cpp (185272 => 185273)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/cf/SharedBufferCF.cpp        2015-06-05 23:16:26 UTC (rev 185272)
+++ trunk/Source/WebCore/platform/cf/SharedBufferCF.cpp        2015-06-05 23:20:06 UTC (rev 185273)
</span><span class="lines">@@ -35,6 +35,7 @@
</span><span class="cx"> SharedBuffer::SharedBuffer(CFDataRef cfData)
</span><span class="cx">     : m_buffer(adoptRef(new DataBuffer))
</span><span class="cx">     , m_cfData(cfData)
</span><ins>+    , m_vnodeToken(VNodeTracker::singleton().token())
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformcocoaVNodeTrackerCocoacpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/cocoa/VNodeTrackerCocoa.cpp (0 => 185273)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/cocoa/VNodeTrackerCocoa.cpp                                (rev 0)
+++ trunk/Source/WebCore/platform/cocoa/VNodeTrackerCocoa.cpp        2015-06-05 23:20:06 UTC (rev 185273)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;VNodeTracker.h&quot;
+
+#include &quot;Logging.h&quot;
+#include &lt;algorithm&gt;
+#include &lt;sys/sysctl.h&gt;
+#include &lt;sys/types.h&gt;
+
+namespace WebCore {
+
+void VNodeTracker::platformInitialize()
+{
+    unsigned systemMaxVNodes = 0;
+    size_t len = sizeof(systemMaxVNodes);
+
+    // Query the maximum number of vnodes on the system and use 15% of that value as soft limit for this process,
+    // and 20% of that value as hard limit.
+    if (sysctlbyname(&quot;kern.maxvnodes&quot;, &amp;systemMaxVNodes, &amp;len, nullptr, 0))
+        return;
+
+    LOG(MemoryPressure, &quot;System vnode limit is %u&quot;, systemMaxVNodes);
+
+    m_softVNodeLimit = std::max(m_softVNodeLimit, static_cast&lt;unsigned&gt;(systemMaxVNodes * 0.15));
+    m_hardVNodeLimit = std::max(m_hardVNodeLimit, static_cast&lt;unsigned&gt;(systemMaxVNodes * 0.2));
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (185272 => 185273)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-06-05 23:16:26 UTC (rev 185272)
+++ trunk/Source/WebKit2/ChangeLog        2015-06-05 23:20:06 UTC (rev 185273)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2015-06-05  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        [WK2][iOS] Limit the number of vnodes used by the WebContent processes
+        https://bugs.webkit.org/show_bug.cgi?id=145672
+        &lt;rdar://problem/21126637&gt;
+
+        Reviewed by Antti Koivisto.
+
+        Have the WebContent process register a vnode pressure handler on iOS,
+        which calls the memory pressure handler.
+
+        On non-critical pressure, it will prune dead resources from the memory
+        cache, which should free up some vnodes. On critical pressure, the
+        handler will clear the PageCache and do a JS GC, which should free even
+        more vnodes.
+
+        * WebProcess/cocoa/WebProcessCocoa.mm:
+        (WebKit::WebProcess::platformInitializeWebProcess):
+
</ins><span class="cx"> 2015-06-05  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix refacto, don't put IndexedDB databases in the cache directory
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcesscocoaWebProcessCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm (185272 => 185273)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm        2015-06-05 23:16:26 UTC (rev 185272)
+++ trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm        2015-06-05 23:20:06 UTC (rev 185273)
</span><span class="lines">@@ -50,6 +50,7 @@
</span><span class="cx"> #import &lt;WebCore/MemoryCache.h&gt;
</span><span class="cx"> #import &lt;WebCore/MemoryPressureHandler.h&gt;
</span><span class="cx"> #import &lt;WebCore/PageCache.h&gt;
</span><ins>+#import &lt;WebCore/VNodeTracker.h&gt;
</ins><span class="cx"> #import &lt;WebCore/WebCoreNSURLExtras.h&gt;
</span><span class="cx"> #import &lt;WebKitSystemInterface.h&gt;
</span><span class="cx"> #import &lt;algorithm&gt;
</span><span class="lines">@@ -147,6 +148,15 @@
</span><span class="cx"> 
</span><span class="cx">     MemoryPressureHandler::ReliefLogger::setLoggingEnabled(parameters.shouldEnableMemoryPressureReliefLogging);
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+    // Track the number of vnodes we are using on iOS and make sure we only use a
+    // reasonable amount because limits are fairly low on iOS devices and we can
+    // get killed when reaching the limit.
+    VNodeTracker::singleton().setPressureHandler([] (Critical critical) {
+        MemoryPressureHandler::singleton().releaseMemory(critical);
+    });
+#endif
+
</ins><span class="cx">     setEnhancedAccessibility(parameters.accessibilityEnhancedUserInterfaceEnabled);
</span><span class="cx"> 
</span><span class="cx"> #if USE(APPKIT)
</span></span></pre>
</div>
</div>

</body>
</html>