Title: [208333] branches/safari-602-branch/Source

Diff

Modified: branches/safari-602-branch/Source/WebCore/ChangeLog (208332 => 208333)


--- branches/safari-602-branch/Source/WebCore/ChangeLog	2016-11-03 18:04:33 UTC (rev 208332)
+++ branches/safari-602-branch/Source/WebCore/ChangeLog	2016-11-03 18:04:39 UTC (rev 208333)
@@ -1,5 +1,31 @@
 2016-11-03  Matthew Hanson  <[email protected]>
 
+        Merge r208286. rdar://problem/28634857
+
+    2016-11-02  David Kilzer  <[email protected]>
+
+            Add logging for "WebKit encountered an internal error" messages
+            <https://webkit.org/b/164272>
+            <rdar://problem/28546064>
+
+            Reviewed by Alex Christensen.
+
+            * page/DiagnosticLoggingKeys.cpp:
+            (WebCore::DiagnosticLoggingKeys::internalErrorKey):
+            (WebCore::DiagnosticLoggingKeys::invalidSessionIDKey):
+            (WebCore::DiagnosticLoggingKeys::createSharedBufferFailedKey):
+            (WebCore::DiagnosticLoggingKeys::synchronousMessageFailedKey):
+            - Add implementations for new key methods.
+
+            * page/DiagnosticLoggingKeys.h:
+            (WebCore::DiagnosticLoggingKeys::internalErrorKey):
+            (WebCore::DiagnosticLoggingKeys::invalidSessionIDKey):
+            (WebCore::DiagnosticLoggingKeys::createSharedBufferFailedKey):
+            (WebCore::DiagnosticLoggingKeys::synchronousMessageFailedKey):
+            - Add declarations for new key methods.
+
+2016-11-03  Matthew Hanson  <[email protected]>
+
         Merge r208101. rdar://problem/29053206
 
     2016-10-29  Youenn Fablet  <[email protected]>

Modified: branches/safari-602-branch/Source/WebCore/loader/ResourceLoader.h (208332 => 208333)


--- branches/safari-602-branch/Source/WebCore/loader/ResourceLoader.h	2016-11-03 18:04:33 UTC (rev 208332)
+++ branches/safari-602-branch/Source/WebCore/loader/ResourceLoader.h	2016-11-03 18:04:39 UTC (rev 208333)
@@ -145,6 +145,7 @@
     void unschedule(WTF::SchedulePair&);
 #endif
 
+    const Frame* frame() const { return m_frame.get(); }
     WEBCORE_EXPORT bool isAlwaysOnLoggingAllowed() const;
 
 protected:

Modified: branches/safari-602-branch/Source/WebCore/page/DiagnosticLoggingKeys.cpp (208332 => 208333)


--- branches/safari-602-branch/Source/WebCore/page/DiagnosticLoggingKeys.cpp	2016-11-03 18:04:33 UTC (rev 208332)
+++ branches/safari-602-branch/Source/WebCore/page/DiagnosticLoggingKeys.cpp	2016-11-03 18:04:39 UTC (rev 208333)
@@ -233,6 +233,16 @@
     return ASCIILiteral("inMemoryCache");
 }
 
+String DiagnosticLoggingKeys::internalErrorKey()
+{
+    return ASCIILiteral("internalError");
+}
+
+String DiagnosticLoggingKeys::invalidSessionIDKey()
+{
+    return ASCIILiteral("invalidSessionID");
+}
+
 String DiagnosticLoggingKeys::isAttachmentKey()
 {
     return ASCIILiteral("isAttachment");
@@ -288,6 +298,11 @@
     return ASCIILiteral("cannotSuspendActiveDOMObjects");
 }
 
+String DiagnosticLoggingKeys::createSharedBufferFailedKey()
+{
+    return ASCIILiteral("createSharedBufferFailed");
+}
+
 String DiagnosticLoggingKeys::deltaKey()
 {
     return ASCIILiteral("delta");
@@ -443,6 +458,11 @@
     return ASCIILiteral("svgDocument");
 }
 
+String DiagnosticLoggingKeys::synchronousMessageFailedKey()
+{
+    return ASCIILiteral("synchronousMessageFailed");
+}
+
 String DiagnosticLoggingKeys::uncacheableStatusCodeKey()
 {
     return ASCIILiteral("uncacheableStatusCode");

Modified: branches/safari-602-branch/Source/WebCore/page/DiagnosticLoggingKeys.h (208332 => 208333)


--- branches/safari-602-branch/Source/WebCore/page/DiagnosticLoggingKeys.h	2016-11-03 18:04:33 UTC (rev 208332)
+++ branches/safari-602-branch/Source/WebCore/page/DiagnosticLoggingKeys.h	2016-11-03 18:04:39 UTC (rev 208333)
@@ -39,6 +39,7 @@
     static String cachedResourceRevalidationKey();
     static String canCacheKey();
     static String cannotSuspendActiveDOMObjectsKey();
+    WEBCORE_EXPORT static String createSharedBufferFailedKey();
     WEBCORE_EXPORT static String deltaKey();
     static String deniedByClientKey();
     static String deviceMotionKey();
@@ -56,6 +57,8 @@
     static String httpsNoStoreKey();
     static String imageKey();
     static String inMemoryCacheKey();
+    WEBCORE_EXPORT static String internalErrorKey();
+    WEBCORE_EXPORT static String invalidSessionIDKey();
     WEBCORE_EXPORT static String isAttachmentKey();
     WEBCORE_EXPORT static String isConditionalRequestKey();
     static String isDisabledKey();
@@ -120,6 +123,7 @@
     WEBCORE_EXPORT static String successfulSpeculativeWarmupWithRevalidationKey();
     WEBCORE_EXPORT static String successfulSpeculativeWarmupWithoutRevalidationKey();
     static String svgDocumentKey();
+    WEBCORE_EXPORT static String synchronousMessageFailedKey();
     WEBCORE_EXPORT static String uncacheableStatusCodeKey();
     static String underMemoryPressureKey();
     WEBCORE_EXPORT static String unknownEntryRequestKey();

Modified: branches/safari-602-branch/Source/WebKit2/ChangeLog (208332 => 208333)


--- branches/safari-602-branch/Source/WebKit2/ChangeLog	2016-11-03 18:04:33 UTC (rev 208332)
+++ branches/safari-602-branch/Source/WebKit2/ChangeLog	2016-11-03 18:04:39 UTC (rev 208333)
@@ -1,3 +1,23 @@
+2016-11-03  Matthew Hanson  <[email protected]>
+
+        Merge r208286. rdar://problem/28634857
+
+    2016-11-02  David Kilzer  <[email protected]>
+
+            Add logging for "WebKit encountered an internal error" messages
+            <https://webkit.org/b/164272>
+            <rdar://problem/28546064>
+
+            Reviewed by Alex Christensen.
+
+            * NetworkProcess/NetworkResourceLoader.cpp:
+            (WebKit::NetworkResourceLoader::startNetworkLoad):
+            * WebProcess/Network/WebLoaderStrategy.cpp:
+            (WebKit::WebLoaderStrategy::loadResourceSynchronously):
+            * WebProcess/Network/WebResourceLoader.cpp:
+            (WebKit::WebResourceLoader::didReceiveResource):
+            - Add logging for various internalError() events.
+
 2016-11-01  Matthew Hanson  <[email protected]>
 
         Rollout r208255. rdar://problem/28962886

Modified: branches/safari-602-branch/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp (208332 => 208333)


--- branches/safari-602-branch/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp	2016-11-03 18:04:33 UTC (rev 208332)
+++ branches/safari-602-branch/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp	2016-11-03 18:04:39 UTC (rev 208333)
@@ -40,6 +40,7 @@
 #include "WebResourceLoaderMessages.h"
 #include <WebCore/BlobDataFileReference.h>
 #include <WebCore/CertificateInfo.h>
+#include <WebCore/DiagnosticLoggingKeys.h>
 #include <WebCore/HTTPHeaderNames.h>
 #include <WebCore/ProtectionSpace.h>
 #include <WebCore/SharedBuffer.h>
@@ -217,6 +218,7 @@
     if (!networkSession) {
         WTFLogAlways("Attempted to create a NetworkLoad with a session (id=%" PRIu64 ") that does not exist.", parameters.sessionID.sessionID());
         RELEASE_LOG_ERROR_IF_ALLOWED("startNetworkLoad: Attempted to create a NetworkLoad with a session that does not exist (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", sessionID=%" PRIu64 ")", m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier, parameters.sessionID.sessionID());
+        NetworkProcess::singleton().logDiagnosticMessage(m_parameters.webPageID, WebCore::DiagnosticLoggingKeys::internalErrorKey(), WebCore::DiagnosticLoggingKeys::invalidSessionIDKey(), WebCore::ShouldSample::No);
         didFailLoading(internalError(request.url()));
         return;
     }

Modified: branches/safari-602-branch/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp (208332 => 208333)


--- branches/safari-602-branch/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp	2016-11-03 18:04:33 UTC (rev 208332)
+++ branches/safari-602-branch/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp	2016-11-03 18:04:39 UTC (rev 208333)
@@ -42,6 +42,8 @@
 #include "WebResourceLoader.h"
 #include <WebCore/ApplicationCacheHost.h>
 #include <WebCore/CachedResource.h>
+#include <WebCore/DiagnosticLoggingClient.h>
+#include <WebCore/DiagnosticLoggingKeys.h>
 #include <WebCore/Document.h>
 #include <WebCore/DocumentLoader.h>
 #include <WebCore/Frame.h>
@@ -329,6 +331,8 @@
 
     if (!WebProcess::singleton().networkConnection().connection().sendSync(Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad(loadParameters), Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::Reply(error, response, data), 0)) {
         RELEASE_LOG_ERROR_IF_ALLOWED("loadResourceSynchronously: failed sending synchronous network process message (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", loadParameters.webPageID, loadParameters.webFrameID, loadParameters.identifier);
+        if (auto* page = webPage->corePage())
+            page->diagnosticLoggingClient().logDiagnosticMessage(WebCore::DiagnosticLoggingKeys::internalErrorKey(), WebCore::DiagnosticLoggingKeys::synchronousMessageFailedKey(), WebCore::ShouldSample::No);
         response = ResourceResponse();
         error = internalError(request.url());
     }

Modified: branches/safari-602-branch/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp (208332 => 208333)


--- branches/safari-602-branch/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp	2016-11-03 18:04:33 UTC (rev 208332)
+++ branches/safari-602-branch/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp	2016-11-03 18:04:39 UTC (rev 208333)
@@ -35,7 +35,11 @@
 #include "WebProcess.h"
 #include <WebCore/ApplicationCacheHost.h>
 #include <WebCore/CertificateInfo.h>
+#include <WebCore/DiagnosticLoggingClient.h>
+#include <WebCore/DiagnosticLoggingKeys.h>
 #include <WebCore/DocumentLoader.h>
+#include <WebCore/Frame.h>
+#include <WebCore/Page.h>
 #include <WebCore/ResourceError.h>
 #include <WebCore/ResourceLoader.h>
 #include <WebCore/SubresourceLoader.h>
@@ -199,6 +203,10 @@
     if (!buffer) {
         LOG_ERROR("Unable to create buffer from ShareableResource sent from the network process.");
         RELEASE_LOG_IF_ALLOWED("didReceiveResource: Unable to create SharedBuffer");
+        if (auto* frame = m_coreLoader->frame()) {
+            if (auto* page = frame->page())
+                page->diagnosticLoggingClient().logDiagnosticMessage(WebCore::DiagnosticLoggingKeys::internalErrorKey(), WebCore::DiagnosticLoggingKeys::createSharedBufferFailedKey(), WebCore::ShouldSample::No);
+        }
         m_coreLoader->didFail(internalError(m_coreLoader->request().url()));
         return;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to