<!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>[206757] trunk/Source/WebKit2</title>
</head>
<body>

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

<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/206754">r206754</a>.

This change broke the El Capitan and Yosemite debug builds.

Reverted changeset:

&quot;More logging to diagnose &quot;WebKit encountered an internal
error&quot; messages&quot;
https://bugs.webkit.org/show_bug.cgi?id=162754
http://trac.webkit.org/changeset/206754</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkResourceLoadercpp">trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebKit2PlatformLoggingh">trunk/Source/WebKit2/Platform/Logging.h</a></li>
<li><a href="#trunkSourceWebKit2PlatformmacSharedMemoryMaccpp">trunk/Source/WebKit2/Platform/mac/SharedMemoryMac.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessNetworkWebLoaderStrategycpp">trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessNetworkWebResourceLoadercpp">trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (206756 => 206757)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-10-03 22:43:37 UTC (rev 206756)
+++ trunk/Source/WebKit2/ChangeLog        2016-10-03 22:53:43 UTC (rev 206757)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-10-03  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
+
+        Unreviewed, rolling out r206754.
+
+        This change broke the El Capitan and Yosemite debug builds.
+
+        Reverted changeset:
+
+        &quot;More logging to diagnose &quot;WebKit encountered an internal
+        error&quot; messages&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=162754
+        http://trac.webkit.org/changeset/206754
+
</ins><span class="cx"> 2016-10-03  Keith Rollin  &lt;krollin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         More logging to diagnose &quot;WebKit encountered an internal error&quot; messages
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp (206756 => 206757)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp        2016-10-03 22:43:37 UTC (rev 206756)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp        2016-10-03 22:53:43 UTC (rev 206757)
</span><span class="lines">@@ -50,7 +50,6 @@
</span><span class="cx"> using namespace WebCore;
</span><span class="cx"> 
</span><span class="cx"> #define RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, &quot;%p - NetworkResourceLoader::&quot; fmt, this, ##__VA_ARGS__)
</span><del>-#define RELEASE_LOG_ERROR_IF_ALLOWED(fmt, ...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), Network, &quot;%p - NetworkResourceLoader::&quot; fmt, this, ##__VA_ARGS__)
</del><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="lines">@@ -219,7 +218,7 @@
</span><span class="cx">     auto* networkSession = SessionTracker::networkSession(parameters.sessionID);
</span><span class="cx">     if (!networkSession) {
</span><span class="cx">         WTFLogAlways(&quot;Attempted to create a NetworkLoad with a session (id=%&quot; PRIu64 &quot;) that does not exist.&quot;, parameters.sessionID.sessionID());
</span><del>-        RELEASE_LOG_ERROR_IF_ALLOWED(&quot;startNetworkLoad: Attempted to create a NetworkLoad with a session that does not exist (pageID = %&quot; PRIu64 &quot;, frameID = %&quot; PRIu64 &quot;, resourceID = %&quot; PRIu64 &quot;, sessionID=%&quot; PRIu64 &quot;)&quot;, m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier, parameters.sessionID.sessionID());
</del><ins>+        RELEASE_LOG_IF_ALLOWED(&quot;startNetworkLoad: Attempted to create a NetworkLoad with a session that does not exist (pageID = %&quot; PRIu64 &quot;, frameID = %&quot; PRIu64 &quot;, resourceID = %&quot; PRIu64 &quot;, sessionID=%&quot; PRIu64 &quot;)&quot;, m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier, parameters.sessionID.sessionID());
</ins><span class="cx">         didFailLoading(internalError(request.url()));
</span><span class="cx">         return;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformLoggingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/Logging.h (206756 => 206757)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/Logging.h        2016-10-03 22:43:37 UTC (rev 206756)
+++ trunk/Source/WebKit2/Platform/Logging.h        2016-10-03 22:53:43 UTC (rev 206757)
</span><span class="lines">@@ -67,7 +67,6 @@
</span><span class="cx">     M(StorageAPI) \
</span><span class="cx">     M(TextInput) \
</span><span class="cx">     M(ViewGestures) \
</span><del>-    M(VirtualMemory) \
</del><span class="cx">     M(VisibleRects) \
</span><span class="cx"> 
</span><span class="cx"> WEBKIT2_LOG_CHANNELS(DECLARE_LOG_CHANNEL)
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformmacSharedMemoryMaccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/mac/SharedMemoryMac.cpp (206756 => 206757)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/mac/SharedMemoryMac.cpp        2016-10-03 22:43:37 UTC (rev 206756)
+++ trunk/Source/WebKit2/Platform/mac/SharedMemoryMac.cpp        2016-10-03 22:53:43 UTC (rev 206757)
</span><span class="lines">@@ -28,7 +28,6 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;Decoder.h&quot;
</span><span class="cx"> #include &quot;Encoder.h&quot;
</span><del>-#include &quot;Logging.h&quot;
</del><span class="cx"> #include &quot;MachPort.h&quot;
</span><span class="cx"> #include &lt;WebCore/MachSendRight.h&gt;
</span><span class="cx"> #include &lt;WebCore/MachVMSPI.h&gt;
</span><span class="lines">@@ -106,7 +105,7 @@
</span><span class="cx">     mach_vm_address_t address;
</span><span class="cx">     kern_return_t kr = mach_vm_allocate(mach_task_self(), &amp;address, round_page(size), VM_FLAGS_ANYWHERE);
</span><span class="cx">     if (kr != KERN_SUCCESS) {
</span><del>-        RELEASE_LOG_ERROR(VirtualMemory, &quot;%p - SharedMemory::allocate: Failed to allocate mach_vm_allocate shared memory (%zu bytes). %{public}s (%x)&quot;, nullptr, size, mach_error_string(kr), kr);
</del><ins>+        LOG_ERROR(&quot;Failed to allocate mach_vm_allocate shared memory (%zu bytes). %s (%x)&quot;, size, mach_error_string(kr), kr);
</ins><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -139,7 +138,7 @@
</span><span class="cx">     mach_port_t port;
</span><span class="cx">     kern_return_t kr = mach_make_memory_entry_64(mach_task_self(), &amp;memoryObjectSize, offset, machProtection(protection) | VM_PROT_IS_MASK | MAP_MEM_VM_SHARE, &amp;port, parentEntry);
</span><span class="cx">     if (kr != KERN_SUCCESS) {
</span><del>-        RELEASE_LOG_ERROR(VirtualMemory, &quot;%p - SharedMemory::makeMemoryEntry: Failed to create a mach port for shared memory. %{public}s (%x)&quot;, nullptr, mach_error_string(kr), kr);
</del><ins>+        LOG_ERROR(&quot;Failed to create a mach port for shared memory. %s (%x)&quot;, mach_error_string(kr), kr);
</ins><span class="cx">         return { };
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -175,10 +174,8 @@
</span><span class="cx">     vm_prot_t vmProtection = machProtection(protection);
</span><span class="cx">     mach_vm_address_t mappedAddress = 0;
</span><span class="cx">     kern_return_t kr = mach_vm_map(mach_task_self(), &amp;mappedAddress, round_page(handle.m_size), 0, VM_FLAGS_ANYWHERE, handle.m_port, 0, false, vmProtection, vmProtection, VM_INHERIT_NONE);
</span><del>-    if (kr != KERN_SUCCESS) {
-        RELEASE_LOG_ERROR(VirtualMemory, &quot;%p - SharedMemory::map: Failed to map shared memory. %{public}s (%x)&quot;, nullptr, mach_error_string(kr), kr);
</del><ins>+    if (kr != KERN_SUCCESS)
</ins><span class="cx">         return nullptr;
</span><del>-    }
</del><span class="cx"> 
</span><span class="cx">     auto sharedMemory(adoptRef(*new SharedMemory));
</span><span class="cx">     sharedMemory-&gt;m_size = handle.m_size;
</span><span class="lines">@@ -193,18 +190,12 @@
</span><span class="cx"> {
</span><span class="cx">     if (m_data) {
</span><span class="cx">         kern_return_t kr = mach_vm_deallocate(mach_task_self(), toVMAddress(m_data), round_page(m_size));
</span><del>-        if (kr != KERN_SUCCESS) {
-            RELEASE_LOG_ERROR(VirtualMemory, &quot;%p - SharedMemory::~SharedMemory: Failed to deallocate shared memory. %{public}s (%x)&quot;, this, mach_error_string(kr), kr);
-            ASSERT_NOT_REACHED();
-        }
</del><ins>+        ASSERT_UNUSED(kr, kr == KERN_SUCCESS);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (m_port) {
</span><span class="cx">         kern_return_t kr = mach_port_deallocate(mach_task_self(), m_port);
</span><del>-        if (kr != KERN_SUCCESS) {
-            RELEASE_LOG_ERROR(VirtualMemory, &quot;%p - SharedMemory::~SharedMemory: Failed to deallocate port. %{public}s (%x)&quot;, this, mach_error_string(kr), kr);
-            ASSERT_NOT_REACHED();
-        }
</del><ins>+        ASSERT_UNUSED(kr, kr == KERN_SUCCESS);
</ins><span class="cx">     }        
</span><span class="cx"> }
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessNetworkWebLoaderStrategycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp (206756 => 206757)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp        2016-10-03 22:43:37 UTC (rev 206756)
+++ trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp        2016-10-03 22:53:43 UTC (rev 206757)
</span><span class="lines">@@ -305,8 +305,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WebLoaderStrategy::networkProcessCrashed()
</span><span class="cx"> {
</span><del>-    RELEASE_LOG_ERROR(Network, &quot;WebLoaderStrategy::networkProcessCrashed: failing all pending resource loaders&quot;);
-
</del><span class="cx">     for (auto&amp; loader : m_webResourceLoaders)
</span><span class="cx">         scheduleInternallyFailedLoad(*loader.value-&gt;resourceLoader());
</span><span class="cx"> 
</span><span class="lines">@@ -339,7 +337,6 @@
</span><span class="cx">     HangDetectionDisabler hangDetectionDisabler;
</span><span class="cx"> 
</span><span class="cx">     if (!WebProcess::singleton().networkConnection().connection().sendSync(Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad(loadParameters), Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::Reply(error, response, data), 0)) {
</span><del>-        RELEASE_LOG_ERROR_IF_ALLOWED(loadParameters.sessionID, &quot;loadResourceSynchronously: failed sending synchronous network process message (pageID = %&quot; PRIu64 &quot;, frameID = %&quot; PRIu64 &quot;, resourceID = %&quot; PRIu64 &quot;)&quot;, loadParameters.webPageID, loadParameters.webFrameID, loadParameters.identifier);
</del><span class="cx">         response = ResourceResponse();
</span><span class="cx">         error = internalError(request.url());
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessNetworkWebResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp (206756 => 206757)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp        2016-10-03 22:43:37 UTC (rev 206756)
+++ trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp        2016-10-03 22:53:43 UTC (rev 206757)
</span><span class="lines">@@ -199,7 +199,6 @@
</span><span class="cx"> 
</span><span class="cx">     if (!buffer) {
</span><span class="cx">         LOG_ERROR(&quot;Unable to create buffer from ShareableResource sent from the network process.&quot;);
</span><del>-        RELEASE_LOG_IF_ALLOWED(&quot;didReceiveResource: Unable to create SharedBuffer (pageID = %&quot; PRIu64 &quot;, frameID = %&quot; PRIu64 &quot;, resourceID = %&quot; PRIu64 &quot;)&quot;, m_trackingParameters.pageID, m_trackingParameters.frameID, m_trackingParameters.resourceID);
</del><span class="cx">         m_coreLoader-&gt;didFail(internalError(m_coreLoader-&gt;request().url()));
</span><span class="cx">         return;
</span><span class="cx">     }
</span></span></pre>
</div>
</div>

</body>
</html>