<!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>[179164] branches/safari-600.1.4.15-branch/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/179164">179164</a></dd>
<dt>Author</dt> <dd>lforschler@apple.com</dd>
<dt>Date</dt> <dd>2015-01-26 20:50:07 -0800 (Mon, 26 Jan 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merged <a href="http://trac.webkit.org/projects/webkit/changeset/177328">r177328</a>. rdar://problem/19445865</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari6001415branchSourceJavaScriptCoreChangeLog">branches/safari-600.1.4.15-branch/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#branchessafari6001415branchSourceJavaScriptCoreConfigurationsJavaScriptCorexcconfig">branches/safari-600.1.4.15-branch/Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig</a></li>
<li><a href="#branchessafari6001415branchSourceWTFChangeLog">branches/safari-600.1.4.15-branch/Source/WTF/ChangeLog</a></li>
<li><a href="#branchessafari6001415branchSourceWTFWTFvcxprojWTFvcxproj">branches/safari-600.1.4.15-branch/Source/WTF/WTF.vcxproj/WTF.vcxproj</a></li>
<li><a href="#branchessafari6001415branchSourceWTFWTFxcodeprojprojectpbxproj">branches/safari-600.1.4.15-branch/Source/WTF/WTF.xcodeproj/project.pbxproj</a></li>
<li><a href="#branchessafari6001415branchSourceWTFwtfCMakeListstxt">branches/safari-600.1.4.15-branch/Source/WTF/wtf/CMakeLists.txt</a></li>
<li><a href="#branchessafari6001415branchSourceWebCoreChangeLog">branches/safari-600.1.4.15-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari6001415branchSourceWebCorehistoryPageCachecpp">branches/safari-600.1.4.15-branch/Source/WebCore/history/PageCache.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari6001415branchSourceWTFwtfFeatureCountercpp">branches/safari-600.1.4.15-branch/Source/WTF/wtf/FeatureCounter.cpp</a></li>
<li><a href="#branchessafari6001415branchSourceWTFwtfFeatureCounterh">branches/safari-600.1.4.15-branch/Source/WTF/wtf/FeatureCounter.h</a></li>
<li><a href="#branchessafari6001415branchSourceWTFwtfiosFeatureCountermm">branches/safari-600.1.4.15-branch/Source/WTF/wtf/ios/FeatureCounter.mm</a></li>
<li><a href="#branchessafari6001415branchSourceWebCoreplatformFeatureCounterKeysh">branches/safari-600.1.4.15-branch/Source/WebCore/platform/FeatureCounterKeys.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari6001415branchSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/JavaScriptCore/ChangeLog (179163 => 179164)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/JavaScriptCore/ChangeLog        2015-01-27 04:39:58 UTC (rev 179163)
+++ branches/safari-600.1.4.15-branch/Source/JavaScriptCore/ChangeLog        2015-01-27 04:50:07 UTC (rev 179164)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2015-01-26 Lucas Forschler <lforschler@apple.com>
+
+ Merge r177328
+
+ 2014-12-15 Chris Dumez <cdumez@apple.com>
+
+ [iOS] Add feature counting support
+ https://bugs.webkit.org/show_bug.cgi?id=139652
+ <rdar://problem/19255690>
+
+ Reviewed by Gavin Barraclough.
+
+ Link against AppSupport framework on iOS as we need it to implement
+ the new FeatureCounter API in WTF.
+
+ * Configurations/JavaScriptCore.xcconfig:
+
</ins><span class="cx"> 2015-01-21 Babak Shafiei <bshafiei@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r176972.
</span></span></pre></div>
<a id="branchessafari6001415branchSourceJavaScriptCoreConfigurationsJavaScriptCorexcconfig"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig (179163 => 179164)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig        2015-01-27 04:39:58 UTC (rev 179163)
+++ branches/safari-600.1.4.15-branch/Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig        2015-01-27 04:50:07 UTC (rev 179164)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx">
</span><span class="cx"> OTHER_LDFLAGS_BASE = -lobjc -Wl,-Y,3 $(OTHER_LDFLAGS_HIDE_SYMBOLS);
</span><span class="cx"> OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_$(PLATFORM_NAME));
</span><del>-OTHER_LDFLAGS_iphoneos = $(OTHER_LDFLAGS_BASE);
</del><ins>+OTHER_LDFLAGS_iphoneos = $(OTHER_LDFLAGS_BASE) -framework AppSupport;
</ins><span class="cx"> OTHER_LDFLAGS_iphonesimulator = $(OTHER_LDFLAGS_iphoneos);
</span><span class="cx"> OTHER_LDFLAGS_macosx = $(OTHER_LDFLAGS_BASE) -sub_library libobjc -framework CoreServices;
</span><span class="cx"> GCC_PREFIX_HEADER = JavaScriptCorePrefix.h;
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WTF/ChangeLog (179163 => 179164)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WTF/ChangeLog        2015-01-27 04:39:58 UTC (rev 179163)
+++ branches/safari-600.1.4.15-branch/Source/WTF/ChangeLog        2015-01-27 04:50:07 UTC (rev 179164)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2015-01-26 Lucas Forschler <lforschler@apple.com>
+
+ Merge r177328
+
+ 2014-12-15 Chris Dumez <cdumez@apple.com>
+
+ [iOS] Add feature counting support
+ https://bugs.webkit.org/show_bug.cgi?id=139652
+ <rdar://problem/19255690>
+
+ Reviewed by Gavin Barraclough.
+
+ Add a FeatureCounter API for to log / count when a feature
+ is used. For now, this is only implementated on iOS.
+
+ * WTF.vcxproj/WTF.vcxproj:
+ * WTF.xcodeproj/project.pbxproj:
+ * wtf/CMakeLists.txt:
+ * wtf/FeatureCounter.cpp: Added.
+ (WTF::incrementFeatureCounterKey):
+ (WTF::setFeatureCounterKey):
+ * wtf/FeatureCounter.h: Added.
+ * wtf/ios/FeatureCounter.mm: Added.
+ (WTF::incrementFeatureCounterKey):
+ (WTF::setFeatureCounterKey):
+
</ins><span class="cx"> 2015-01-21 Babak Shafiei <bshafiei@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r177000.
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWTFWTFvcxprojWTFvcxproj"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WTF/WTF.vcxproj/WTF.vcxproj (179163 => 179164)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WTF/WTF.vcxproj/WTF.vcxproj        2015-01-27 04:39:58 UTC (rev 179163)
+++ branches/safari-600.1.4.15-branch/Source/WTF/WTF.vcxproj/WTF.vcxproj        2015-01-27 04:50:07 UTC (rev 179164)
</span><span class="lines">@@ -72,6 +72,7 @@
</span><span class="cx"> <ClCompile Include="..\wtf\dtoa\strtod.cc" />
</span><span class="cx"> <ClCompile Include="..\wtf\FastBitVector.cpp" />
</span><span class="cx"> <ClCompile Include="..\wtf\FastMalloc.cpp" />
</span><ins>+ <ClCompile Include="..\wtf\FeatureCounter.cpp" />
</ins><span class="cx"> <ClCompile Include="..\wtf\FilePrintStream.cpp" />
</span><span class="cx"> <ClCompile Include="..\wtf\FunctionDispatcher.cpp" />
</span><span class="cx"> <ClCompile Include="..\wtf\gobject\GlibUtilities.cpp">
</span><span class="lines">@@ -194,6 +195,7 @@
</span><span class="cx"> <ClInclude Include="..\wtf\dtoa\utils.h" />
</span><span class="cx"> <ClInclude Include="..\wtf\FastBitVector.h" />
</span><span class="cx"> <ClInclude Include="..\wtf\FastMalloc.h" />
</span><ins>+ <ClInclude Include="..\wtf\FeatureCounter.h" />
</ins><span class="cx"> <ClInclude Include="..\wtf\FeatureDefines.h" />
</span><span class="cx"> <ClInclude Include="..\wtf\FilePrintStream.h" />
</span><span class="cx"> <ClInclude Include="..\wtf\FlipBytes.h" />
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWTFWTFxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WTF/WTF.xcodeproj/project.pbxproj (179163 => 179164)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WTF/WTF.xcodeproj/project.pbxproj        2015-01-27 04:39:58 UTC (rev 179163)
+++ branches/safari-600.1.4.15-branch/Source/WTF/WTF.xcodeproj/project.pbxproj        2015-01-27 04:50:07 UTC (rev 179164)
</span><span class="lines">@@ -73,6 +73,9 @@
</span><span class="cx">                 2CDED0EF18115C38004DBA70 /* RunLoopCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CDED0EE18115C38004DBA70 /* RunLoopCF.cpp */; };
</span><span class="cx">                 2CDED0F318115C85004DBA70 /* RunLoop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CDED0F118115C85004DBA70 /* RunLoop.cpp */; };
</span><span class="cx">                 2CDED0F418115C85004DBA70 /* RunLoop.h in Headers */ = {isa = PBXBuildFile; fileRef = 2CDED0F218115C85004DBA70 /* RunLoop.h */; };
</span><ins>+                463111841A3F729A00E925A3 /* FeatureCounter.h in Headers */ = {isa = PBXBuildFile; fileRef = 463111831A3F729A00E925A3 /* FeatureCounter.h */; };
+                463111861A3F72B800E925A3 /* FeatureCounter.mm in Sources */ = {isa = PBXBuildFile; fileRef = 463111851A3F72B800E925A3 /* FeatureCounter.mm */; };
+                463111881A3F899100E925A3 /* FeatureCounter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 463111871A3F899100E925A3 /* FeatureCounter.cpp */; };
</ins><span class="cx">                 7CDD7FF8186D291E007433CD /* IteratorAdaptors.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CDD7FF7186D291E007433CD /* IteratorAdaptors.h */; };
</span><span class="cx">                 7CDD7FFA186D2A54007433CD /* IteratorRange.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CDD7FF9186D2A54007433CD /* IteratorRange.h */; };
</span><span class="cx">                 7E29C33E15FFD79B00516D61 /* ObjcRuntimeExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E29C33D15FFD79B00516D61 /* ObjcRuntimeExtras.h */; };
</span><span class="lines">@@ -355,6 +358,9 @@
</span><span class="cx">                 2CDED0F118115C85004DBA70 /* RunLoop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RunLoop.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 2CDED0F218115C85004DBA70 /* RunLoop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RunLoop.h; sourceTree = "<group>"; };
</span><span class="cx">                 44DEE74A152274BB00C6EC37 /* iOS.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = iOS.xcconfig; sourceTree = "<group>"; };
</span><ins>+                463111831A3F729A00E925A3 /* FeatureCounter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FeatureCounter.h; sourceTree = "<group>"; };
+                463111851A3F72B800E925A3 /* FeatureCounter.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FeatureCounter.mm; sourceTree = "<group>"; };
+                463111871A3F899100E925A3 /* FeatureCounter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FeatureCounter.cpp; sourceTree = "<group>"; };
</ins><span class="cx">                 5D247B6214689B8600E78B76 /* libWTF.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libWTF.a; sourceTree = BUILT_PRODUCTS_DIR; };
</span><span class="cx">                 5D247B6E14689C4700E78B76 /* Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = "<group>"; };
</span><span class="cx">                 5D247B7014689C4700E78B76 /* DebugRelease.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = DebugRelease.xcconfig; sourceTree = "<group>"; };
</span><span class="lines">@@ -603,6 +609,7 @@
</span><span class="cx">                 1FA47C87152502DA00568D1B /* ios */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                463111851A3F72B800E925A3 /* FeatureCounter.mm */,
</ins><span class="cx">                                 1FA47C88152502DA00568D1B /* WebCoreThread.cpp */,
</span><span class="cx">                                 1FA47C89152502DA00568D1B /* WebCoreThread.h */,
</span><span class="cx">                         );
</span><span class="lines">@@ -741,6 +748,8 @@
</span><span class="cx">                                 0FD81AC4154FB22E00983E72 /* FastBitVector.h */,
</span><span class="cx">                                 A8A472A1151A825A004123FF /* FastMalloc.cpp */,
</span><span class="cx">                                 A8A472A2151A825A004123FF /* FastMalloc.h */,
</span><ins>+                                463111871A3F899100E925A3 /* FeatureCounter.cpp */,
+                                463111831A3F729A00E925A3 /* FeatureCounter.h */,
</ins><span class="cx">                                 B38FD7BC168953E80065C969 /* FeatureDefines.h */,
</span><span class="cx">                                 0F9D335B165DBA73005AD387 /* FilePrintStream.cpp */,
</span><span class="cx">                                 0F9D335C165DBA73005AD387 /* FilePrintStream.h */,
</span><span class="lines">@@ -1132,6 +1141,7 @@
</span><span class="cx">                                 1AFDE648195201C300C48FFA /* TypeCasts.h in Headers */,
</span><span class="cx">                                 A8A47423151A825B004123FF /* SimpleStats.h in Headers */,
</span><span class="cx">                                 A8A47424151A825B004123FF /* SinglyLinkedList.h in Headers */,
</span><ins>+                                463111841A3F729A00E925A3 /* FeatureCounter.h in Headers */,
</ins><span class="cx">                                 A748745317A0BDAE00FA04CB /* SixCharacterHash.h in Headers */,
</span><span class="cx">                                 A8A47426151A825B004123FF /* Spectrum.h in Headers */,
</span><span class="cx">                                 A8A47428151A825B004123FF /* StackBounds.h in Headers */,
</span><span class="lines">@@ -1296,6 +1306,7 @@
</span><span class="cx">                                 A8A4739C151A825B004123FF /* CurrentTime.cpp in Sources */,
</span><span class="cx">                                 A8A4739E151A825B004123FF /* DataLog.cpp in Sources */,
</span><span class="cx">                                 A8A473A0151A825B004123FF /* DateMath.cpp in Sources */,
</span><ins>+                                463111861A3F72B800E925A3 /* FeatureCounter.mm in Sources */,
</ins><span class="cx">                                 A8A473A2151A825B004123FF /* DecimalNumber.cpp in Sources */,
</span><span class="cx">                                 A8A473AE151A825B004123FF /* diy-fp.cc in Sources */,
</span><span class="cx">                                 A8A473B0151A825B004123FF /* double-conversion.cc in Sources */,
</span><span class="lines">@@ -1316,6 +1327,7 @@
</span><span class="cx">                                 CD5497AC15857D0300B5BC30 /* MediaTime.cpp in Sources */,
</span><span class="cx">                                 A8A473EC151A825B004123FF /* MetaAllocator.cpp in Sources */,
</span><span class="cx">                                 A8A473F4151A825B004123FF /* NumberOfCores.cpp in Sources */,
</span><ins>+                                463111881A3F899100E925A3 /* FeatureCounter.cpp in Sources */,
</ins><span class="cx">                                 A8A473F7151A825B004123FF /* OSAllocatorPosix.cpp in Sources */,
</span><span class="cx">                                 A8A473F9151A825B004123FF /* OSRandomSource.cpp in Sources */,
</span><span class="cx">                                 A8A47400151A825B004123FF /* PageAllocationAligned.cpp in Sources */,
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWTFwtfCMakeListstxt"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WTF/wtf/CMakeLists.txt (179163 => 179164)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WTF/wtf/CMakeLists.txt        2015-01-27 04:39:58 UTC (rev 179163)
+++ branches/safari-600.1.4.15-branch/Source/WTF/wtf/CMakeLists.txt        2015-01-27 04:50:07 UTC (rev 179164)
</span><span class="lines">@@ -24,6 +24,7 @@
</span><span class="cx"> DisallowCType.h
</span><span class="cx"> DoublyLinkedList.h
</span><span class="cx"> FastMalloc.h
</span><ins>+ FeatureCounter.h
</ins><span class="cx"> FeatureDefines.h
</span><span class="cx"> FilePrintStream.h
</span><span class="cx"> FlipBytes.h
</span><span class="lines">@@ -158,6 +159,7 @@
</span><span class="cx"> DecimalNumber.cpp
</span><span class="cx"> FastBitVector.cpp
</span><span class="cx"> FastMalloc.cpp
</span><ins>+ FeatureCounter.cpp
</ins><span class="cx"> FilePrintStream.cpp
</span><span class="cx"> FunctionDispatcher.cpp
</span><span class="cx"> GregorianDateTime.cpp
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWTFwtfFeatureCountercppfromrev177328trunkSourceWTFwtfFeatureCountercpp"></a>
<div class="copfile"><h4>Copied: branches/safari-600.1.4.15-branch/Source/WTF/wtf/FeatureCounter.cpp (from rev 177328, trunk/Source/WTF/wtf/FeatureCounter.cpp) (0 => 179164)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WTF/wtf/FeatureCounter.cpp         (rev 0)
+++ branches/safari-600.1.4.15-branch/Source/WTF/wtf/FeatureCounter.cpp        2015-01-27 04:50:07 UTC (rev 179164)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+/*
+ * Copyright (C) 2014 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 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 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 "config.h"
+#include "FeatureCounter.h"
+
+namespace WTF {
+
+#if !PLATFORM(IOS)
+
+void incrementFeatureCounterKey(const char* const key)
+{
+ UNUSED_PARAM(key);
+}
+
+void setFeatureCounterKey(const char* const key, int64_t value)
+{
+ UNUSED_PARAM(key);
+ UNUSED_PARAM(value);
+}
+
+#endif
+
+} // namespace WTF
</ins></span></pre></div>
<a id="branchessafari6001415branchSourceWTFwtfFeatureCounterhfromrev177328trunkSourceWTFwtfFeatureCounterh"></a>
<div class="copfile"><h4>Copied: branches/safari-600.1.4.15-branch/Source/WTF/wtf/FeatureCounter.h (from rev 177328, trunk/Source/WTF/wtf/FeatureCounter.h) (0 => 179164)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WTF/wtf/FeatureCounter.h         (rev 0)
+++ branches/safari-600.1.4.15-branch/Source/WTF/wtf/FeatureCounter.h        2015-01-27 04:50:07 UTC (rev 179164)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+/*
+ * Copyright (C) 2014 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 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 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 FeatureCounter_h
+#define FeatureCounter_h
+
+namespace WTF {
+
+WTF_EXPORT_PRIVATE void incrementFeatureCounterKey(const char* const key);
+WTF_EXPORT_PRIVATE void setFeatureCounterKey(const char* const key, int64_t value);
+
+#define FEATURE_COUNTER_INCREMENT_KEY(key) WTF::incrementFeatureCounterKey(key)
+#define FEATURE_COUNTER_SET_KEY(key, value) WTF::setFeatureCounterKey(key, value)
+
+} // namespace WTF
+
+#endif // FeatureCounter_h
</ins></span></pre></div>
<a id="branchessafari6001415branchSourceWTFwtfiosFeatureCountermmfromrev177328trunkSourceWTFwtfiosFeatureCountermm"></a>
<div class="copfile"><h4>Copied: branches/safari-600.1.4.15-branch/Source/WTF/wtf/ios/FeatureCounter.mm (from rev 177328, trunk/Source/WTF/wtf/ios/FeatureCounter.mm) (0 => 179164)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WTF/wtf/ios/FeatureCounter.mm         (rev 0)
+++ branches/safari-600.1.4.15-branch/Source/WTF/wtf/ios/FeatureCounter.mm        2015-01-27 04:50:07 UTC (rev 179164)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+/*
+ * Copyright (C) 2014 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 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 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.
+ */
+
+#import "config.h"
+#import "FeatureCounter.h"
+
+#if PLATFORM(IOS)
+#import <AppSupport/CPAggregateDictionary.h>
+
+namespace WTF {
+
+void incrementFeatureCounterKey(const char* const key)
+{
+ NSString *nsKey = [[NSString alloc] initWithCharactersNoCopy:reinterpret_cast<unichar*>(const_cast<char*>(key)) length:strlen(key) freeWhenDone:NO];
+ [[CPAggregateDictionary sharedAggregateDictionary] incrementKey:nsKey];
+}
+
+void setFeatureCounterKey(const char* const key, int64_t value)
+{
+ NSString *nsKey = [[NSString alloc] initWithCharactersNoCopy:reinterpret_cast<unichar*>(const_cast<char*>(key)) length:strlen(key) freeWhenDone:NO];
+ [[CPAggregateDictionary sharedAggregateDictionary] setValue:value forScalarKey:nsKey];
+}
+
+} // namespace WTF
+
+#endif // PLATFORM(IOS)
</ins></span></pre></div>
<a id="branchessafari6001415branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/ChangeLog (179163 => 179164)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/ChangeLog        2015-01-27 04:39:58 UTC (rev 179163)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/ChangeLog        2015-01-27 04:50:07 UTC (rev 179164)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2015-01-26 Lucas Forschler <lforschler@apple.com>
+
+ Merge r177328
+
+ 2014-12-15 Chris Dumez <cdumez@apple.com>
+
+ [iOS] Add feature counting support
+ https://bugs.webkit.org/show_bug.cgi?id=139652
+ <rdar://problem/19255690>
+
+ Reviewed by Gavin Barraclough.
+
+ Use FeatureCounter API to log PageCache failure reasons
+ as well as its success rate.
+
+ No new tests, no behavior change.
+
+ * history/PageCache.cpp:
+ (WebCore::logCanCacheFrameDecision):
+ (WebCore::logCanCachePageDecision):
+ (WebCore::PageCache::canCache):
+ * platform/FeatureCounterKeys.h: Added.
+
</ins><span class="cx"> 2015-01-26 David Kilzer <ddkilzer@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r177927.
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebCorehistoryPageCachecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/history/PageCache.cpp (179163 => 179164)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/history/PageCache.cpp        2015-01-27 04:39:58 UTC (rev 179163)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/history/PageCache.cpp        2015-01-27 04:50:07 UTC (rev 179164)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2007 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2007, 2014 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx"> #include "DeviceOrientationController.h"
</span><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "DocumentLoader.h"
</span><ins>+#include "FeatureCounterKeys.h"
</ins><span class="cx"> #include "FrameLoader.h"
</span><span class="cx"> #include "FrameLoaderClient.h"
</span><span class="cx"> #include "FrameLoaderStateMachine.h"
</span><span class="lines">@@ -66,6 +67,12 @@
</span><span class="cx"> #if !defined(NDEBUG)
</span><span class="cx">
</span><span class="cx"> #define PCLOG(...) LOG(PageCache, "%*s%s", indentLevel*4, "", makeString(__VA_ARGS__).utf8().data())
</span><ins>+
+#else
+
+#define PCLOG(...) ((void)0)
+
+#endif // !defined(NDEBUG)
</ins><span class="cx">
</span><span class="cx"> // Used in histograms, please only add at the end, and do not remove elements (renaming e.g. to "FooEnumUnused1" is fine).
</span><span class="cx"> // This is because statistics may be gathered from histograms between versions over time, and re-using values causes collisions.
</span><span class="lines">@@ -94,6 +101,7 @@
</span><span class="cx"> PCLOG("+---");
</span><span class="cx"> if (!frame->loader().documentLoader()) {
</span><span class="cx"> PCLOG(" -There is no DocumentLoader object");
</span><ins>+ FEATURE_COUNTER_INCREMENT_KEY(FeatureCounterPageCacheFailureNoDocumentLoaderKey);
</ins><span class="cx"> return 1 << NoDocumentLoader;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -107,6 +115,7 @@
</span><span class="cx"> unsigned rejectReasons = 0;
</span><span class="cx"> if (!frame->loader().documentLoader()->mainDocumentError().isNull()) {
</span><span class="cx"> PCLOG(" -Main document has an error");
</span><ins>+ FEATURE_COUNTER_INCREMENT_KEY(FeatureCounterPageCacheFailureMainDocumentErrorKey);
</ins><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx"> rejectReasons |= 1 << MainDocumentError;
</span><span class="cx"> #else
</span><span class="lines">@@ -118,15 +127,21 @@
</span><span class="cx"> }
</span><span class="cx"> if (frame->loader().documentLoader()->substituteData().isValid() && frame->loader().documentLoader()->substituteData().failingURL().isEmpty()) {
</span><span class="cx"> PCLOG(" -Frame is an error page");
</span><ins>+ FEATURE_COUNTER_INCREMENT_KEY(FeatureCounterPageCacheFailureIsErrorPageKey);
</ins><span class="cx"> rejectReasons |= 1 << IsErrorPage;
</span><span class="cx"> }
</span><span class="cx"> if (frame->loader().subframeLoader().containsPlugins() && !frame->page()->settings().pageCacheSupportsPlugins()) {
</span><span class="cx"> PCLOG(" -Frame contains plugins");
</span><ins>+ FEATURE_COUNTER_INCREMENT_KEY(FeatureCounterPageCacheFailureHasPlugins);
</ins><span class="cx"> rejectReasons |= 1 << HasPlugins;
</span><span class="cx"> }
</span><span class="cx"> if (frame->document()->url().protocolIs("https")
</span><span class="cx"> && (frame->loader().documentLoader()->response().cacheControlContainsNoCache()
</span><span class="cx"> || frame->loader().documentLoader()->response().cacheControlContainsNoStore())) {
</span><ins>+ if (frame->loader().documentLoader()->response().cacheControlContainsNoCache())
+ FEATURE_COUNTER_INCREMENT_KEY(FeatureCounterPageCacheFailureHTTPSNoCacheKey);
+ if (frame->loader().documentLoader()->response().cacheControlContainsNoStore())
+ FEATURE_COUNTER_INCREMENT_KEY(FeatureCounterPageCacheFailureHTTPSNoStoreKey);
</ins><span class="cx"> PCLOG(" -Frame is HTTPS, and cache control prohibits caching or storing");
</span><span class="cx"> rejectReasons |= 1 << IsHttpsAndCacheControlled;
</span><span class="cx"> }
</span><span class="lines">@@ -142,41 +157,50 @@
</span><span class="cx"> #if ENABLE(SQL_DATABASE)
</span><span class="cx"> if (DatabaseManager::manager().hasOpenDatabases(frame->document())) {
</span><span class="cx"> PCLOG(" -Frame has open database handles");
</span><ins>+ FEATURE_COUNTER_INCREMENT_KEY(FeatureCounterPageCacheFailureHasOpenDatabasesKey);
</ins><span class="cx"> rejectReasons |= 1 << HasDatabaseHandles;
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(SHARED_WORKERS)
</span><span class="cx"> if (SharedWorkerRepository::hasSharedWorkers(frame->document())) {
</span><span class="cx"> PCLOG(" -Frame has associated SharedWorkers");
</span><ins>+ FEATURE_COUNTER_INCREMENT_KEY(FeatureCounterPageCacheFailureHasSharedWorkersKey);
</ins><span class="cx"> rejectReasons |= 1 << HasSharedWorkers;
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> if (!frame->loader().history().currentItem()) {
</span><span class="cx"> PCLOG(" -No current history item");
</span><ins>+ FEATURE_COUNTER_INCREMENT_KEY(FeatureCounterPageCacheFailureNoCurrentHistoryItemKey);
</ins><span class="cx"> rejectReasons |= 1 << NoHistoryItem;
</span><span class="cx"> }
</span><span class="cx"> if (frame->loader().quickRedirectComing()) {
</span><span class="cx"> PCLOG(" -Quick redirect is coming");
</span><ins>+ FEATURE_COUNTER_INCREMENT_KEY(FeatureCounterPageCacheFailureQuirkRedirectComingKey);
</ins><span class="cx"> rejectReasons |= 1 << QuickRedirectComing;
</span><span class="cx"> }
</span><span class="cx"> if (frame->loader().documentLoader()->isLoadingInAPISense()) {
</span><span class="cx"> PCLOG(" -DocumentLoader is still loading in API sense");
</span><ins>+ FEATURE_COUNTER_INCREMENT_KEY(FeatureCounterPageCacheFailureLoadingAPISenseKey);
</ins><span class="cx"> rejectReasons |= 1 << IsLoadingInAPISense;
</span><span class="cx"> }
</span><span class="cx"> if (frame->loader().documentLoader()->isStopping()) {
</span><span class="cx"> PCLOG(" -DocumentLoader is in the middle of stopping");
</span><ins>+ FEATURE_COUNTER_INCREMENT_KEY(FeatureCounterPageCacheFailureDocumentLoaderStoppingKey);
</ins><span class="cx"> rejectReasons |= 1 << IsStopping;
</span><span class="cx"> }
</span><span class="cx"> if (!frame->document()->canSuspendActiveDOMObjects()) {
</span><del>- PCLOG(" -The document cannot suspect its active DOM Objects");
</del><ins>+ PCLOG(" -The document cannot suspend its active DOM Objects");
+ FEATURE_COUNTER_INCREMENT_KEY(FeatureCounterPageCacheFailureCannotSuspendActiveDOMObjectsKey);
</ins><span class="cx"> rejectReasons |= 1 << CannotSuspendActiveDOMObjects;
</span><span class="cx"> }
</span><span class="cx"> if (!frame->loader().documentLoader()->applicationCacheHost()->canCacheInPageCache()) {
</span><span class="cx"> PCLOG(" -The DocumentLoader uses an application cache");
</span><ins>+ FEATURE_COUNTER_INCREMENT_KEY(FeatureCounterPageCacheFailureApplicationCacheKey);
</ins><span class="cx"> rejectReasons |= 1 << DocumentLoaderUsesApplicationCache;
</span><span class="cx"> }
</span><span class="cx"> if (!frame->loader().client().canCachePage()) {
</span><span class="cx"> PCLOG(" -The client says this frame cannot be cached");
</span><ins>+ FEATURE_COUNTER_INCREMENT_KEY(FeatureCounterPageCacheFailureDeniedByClientKey);
</ins><span class="cx"> rejectReasons |= 1 << ClientDeniesCaching;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -228,38 +252,48 @@
</span><span class="cx"> #if ENABLE(DEVICE_ORIENTATION) && !PLATFORM(IOS)
</span><span class="cx"> if (DeviceMotionController::isActiveAt(page)) {
</span><span class="cx"> PCLOG(" -Page is using DeviceMotion");
</span><ins>+ FEATURE_COUNTER_INCREMENT_KEY(FeatureCounterPageCacheFailureDeviceMotionKey);
</ins><span class="cx"> rejectReasons |= 1 << UsesDeviceMotion;
</span><span class="cx"> }
</span><span class="cx"> if (DeviceOrientationController::isActiveAt(page)) {
</span><span class="cx"> PCLOG(" -Page is using DeviceOrientation");
</span><ins>+ FEATURE_COUNTER_INCREMENT_KEY(FeatureCounterPageCacheFailureDeviceOrientationKey);
</ins><span class="cx"> rejectReasons |= 1 << UsesDeviceOrientation;
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(PROXIMITY_EVENTS)
</span><span class="cx"> if (DeviceProximityController::isActiveAt(page)) {
</span><span class="cx"> PCLOG(" -Page is using DeviceProximity");
</span><ins>+ FEATURE_COUNTER_INCREMENT_KEY(FeatureCounterPageCacheFailureDeviceProximityKey);
</ins><span class="cx"> rejectReasons |= 1 << UsesDeviceMotion;
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> FrameLoadType loadType = page->mainFrame().loader().loadType();
</span><span class="cx"> if (loadType == FrameLoadType::Reload) {
</span><span class="cx"> PCLOG(" -Load type is: Reload");
</span><ins>+ FEATURE_COUNTER_INCREMENT_KEY(FeatureCounterPageCacheFailureReloadKey);
</ins><span class="cx"> rejectReasons |= 1 << IsReload;
</span><span class="cx"> }
</span><span class="cx"> if (loadType == FrameLoadType::ReloadFromOrigin) {
</span><span class="cx"> PCLOG(" -Load type is: Reload from origin");
</span><ins>+ FEATURE_COUNTER_INCREMENT_KEY(FeatureCounterPageCacheFailureReloadFromOriginKey);
</ins><span class="cx"> rejectReasons |= 1 << IsReloadFromOrigin;
</span><span class="cx"> }
</span><span class="cx"> if (loadType == FrameLoadType::Same) {
</span><span class="cx"> PCLOG(" -Load type is: Same");
</span><ins>+ FEATURE_COUNTER_INCREMENT_KEY(FeatureCounterPageCacheFailureSameLoadKey);
</ins><span class="cx"> rejectReasons |= 1 << IsSameLoad;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- PCLOG(rejectReasons ? " Page CANNOT be cached\n--------" : " Page CAN be cached\n--------");
</del><ins>+ if (rejectReasons) {
+ PCLOG(" Page CANNOT be cached\n--------");
+ FEATURE_COUNTER_INCREMENT_KEY(FeatureCounterPageCacheFailureKey);
+ } else {
+ PCLOG(" Page CAN be cached\n--------");
+ FEATURE_COUNTER_INCREMENT_KEY(FeatureCounterPageCacheSuccessKey);
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-#endif // !defined(NDEBUG)
-
</del><span class="cx"> PageCache* pageCache()
</span><span class="cx"> {
</span><span class="cx"> static PageCache* staticPageCache = new PageCache;
</span><span class="lines">@@ -321,9 +355,7 @@
</span><span class="cx"> if (!page)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>-#if !defined(NDEBUG)
</del><span class="cx"> logCanCachePageDecision(page);
</span><del>-#endif
</del><span class="cx">
</span><span class="cx"> if (memoryPressureHandler().isUnderMemoryPressure())
</span><span class="cx"> return false;
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebCoreplatformFeatureCounterKeyshfromrev177328trunkSourceWebCoreplatformFeatureCounterKeysh"></a>
<div class="copfile"><h4>Copied: branches/safari-600.1.4.15-branch/Source/WebCore/platform/FeatureCounterKeys.h (from rev 177328, trunk/Source/WebCore/platform/FeatureCounterKeys.h) (0 => 179164)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/platform/FeatureCounterKeys.h         (rev 0)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/platform/FeatureCounterKeys.h        2015-01-27 04:50:07 UTC (rev 179164)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+/*
+ * Copyright (C) 2014 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 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 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 FeatureCounterKeys_h
+#define FeatureCounterKeys_h
+
+#include <wtf/FeatureCounter.h>
+
+namespace WebCore {
+
+// Page cache.
+static const char FeatureCounterPageCacheFailureNoDocumentLoaderKey[] = "com.apple.WebKit.pageCache.failure.noDocumentLoader";
+static const char FeatureCounterPageCacheFailureMainDocumentErrorKey[] = "com.apple.WebKit.pageCache.failure.mainDocumentError";
+static const char FeatureCounterPageCacheFailureIsErrorPageKey[] = "com.apple.WebKit.pageCache.failure.isErrorPage";
+static const char FeatureCounterPageCacheFailureHasPlugins[] = "com.apple.WebKit.pageCache.failure.hasPlugins";
+static const char FeatureCounterPageCacheFailureHTTPSNoCacheKey[] = "com.apple.WebKit.pageCache.failure.httpsNoCache";
+static const char FeatureCounterPageCacheFailureHTTPSNoStoreKey[] = "com.apple.WebKit.pageCache.failure.httpsNoStore";
+#if ENABLE(SQL_DATABASE)
+static const char FeatureCounterPageCacheFailureHasOpenDatabasesKey[] = "com.apple.WebKit.pageCache.failure.hasOpenDatabases";
+#endif
+#if ENABLE(SHARED_WORKERS)
+static const char FeatureCounterPageCacheFailureHasSharedWorkersKey[] = "com.apple.WebKit.pageCache.failure.hasSharedWorkers";
+#endif
+static const char FeatureCounterPageCacheFailureNoCurrentHistoryItemKey[] = "com.apple.WebKit.pageCache.failure.noCurrentHistoryItem";
+static const char FeatureCounterPageCacheFailureQuirkRedirectComingKey[] = "com.apple.WebKit.pageCache.failure.quirkRedirectComing";
+static const char FeatureCounterPageCacheFailureLoadingAPISenseKey[] = "com.apple.WebKit.pageCache.failure.loadingAPISense";
+static const char FeatureCounterPageCacheFailureDocumentLoaderStoppingKey[] = "com.apple.WebKit.pageCache.failure.documentLoaderStopping";
+static const char FeatureCounterPageCacheFailureCannotSuspendActiveDOMObjectsKey[] = "com.apple.WebKit.pageCache.failure.cannotSuspendActiveDOMObjects";
+static const char FeatureCounterPageCacheFailureApplicationCacheKey[] = "com.apple.WebKit.pageCache.failure.applicationCache";
+static const char FeatureCounterPageCacheFailureDeniedByClientKey[] = "com.apple.WebKit.pageCache.failure.deniedByClient";
+#if ENABLE(DEVICE_ORIENTATION)
+static const char FeatureCounterPageCacheFailureDeviceMotionKey[] = "com.apple.WebKit.pageCache.failure.deviceMotion";
+static const char FeatureCounterPageCacheFailureDeviceOrientationKey[] = "com.apple.WebKit.pageCache.failure.deviceOrientation";
+#endif
+#if ENABLE(PROXIMITY_EVENTS)
+static const char FeatureCounterPageCacheFailureDeviceProximityKey[] = "com.apple.WebKit.pageCache.failure.deviceProximity";
+#endif
+static const char FeatureCounterPageCacheFailureReloadKey[] = "com.apple.WebKit.pageCache.failure.reload";
+static const char FeatureCounterPageCacheFailureReloadFromOriginKey[] = "com.apple.WebKit.pageCache.failure.reloadFromOrigin";
+static const char FeatureCounterPageCacheFailureSameLoadKey[] = "com.apple.WebKit.pageCache.failure.sameLoad";
+static const char FeatureCounterPageCacheFailureKey[] = "com.apple.WebKit.pageCache.failure";
+static const char FeatureCounterPageCacheSuccessKey[] = "com.apple.WebKit.pageCache.success";
+
+} // namespace WebCore
+
+#endif // FeatureCounterKeys_h
+
</ins></span></pre>
</div>
</div>
</body>
</html>