- Revision
- 208286
- Author
- ddkil...@apple.com
- Date
- 2016-11-02 09:57:33 -0700 (Wed, 02 Nov 2016)
Log Message
Add logging for "WebKit encountered an internal error" messages
<https://webkit.org/b/164272>
<rdar://problem/28546064>
Reviewed by Alex Christensen.
Source/WebCore:
* 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.
Source/WebKit2:
* 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.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (208285 => 208286)
--- trunk/Source/WebCore/ChangeLog 2016-11-02 16:35:08 UTC (rev 208285)
+++ trunk/Source/WebCore/ChangeLog 2016-11-02 16:57:33 UTC (rev 208286)
@@ -1,3 +1,25 @@
+2016-11-02 David Kilzer <ddkil...@apple.com>
+
+ 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-02 Zalan Bujtas <za...@apple.com>
[Tables] Simplified layout skips captions.
Modified: trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp (208285 => 208286)
--- trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp 2016-11-02 16:35:08 UTC (rev 208285)
+++ trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp 2016-11-02 16:57:33 UTC (rev 208286)
@@ -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: trunk/Source/WebCore/page/DiagnosticLoggingKeys.h (208285 => 208286)
--- trunk/Source/WebCore/page/DiagnosticLoggingKeys.h 2016-11-02 16:35:08 UTC (rev 208285)
+++ trunk/Source/WebCore/page/DiagnosticLoggingKeys.h 2016-11-02 16:57:33 UTC (rev 208286)
@@ -38,6 +38,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();
@@ -55,6 +56,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();
@@ -119,6 +122,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: trunk/Source/WebKit2/ChangeLog (208285 => 208286)
--- trunk/Source/WebKit2/ChangeLog 2016-11-02 16:35:08 UTC (rev 208285)
+++ trunk/Source/WebKit2/ChangeLog 2016-11-02 16:57:33 UTC (rev 208286)
@@ -1,3 +1,19 @@
+2016-11-02 David Kilzer <ddkil...@apple.com>
+
+ 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-02 Carlos Garcia Campos <cgar...@igalia.com>
[GTK] BadDamage X Window System error in WebKit::AcceleratedBackingStoreX11::update when called from WebPageProxy::exitAcceleratedCompositingMode
Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp (208285 => 208286)
--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp 2016-11-02 16:35:08 UTC (rev 208285)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp 2016-11-02 16:57:33 UTC (rev 208286)
@@ -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>
@@ -222,6 +223,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: trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp (208285 => 208286)
--- trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp 2016-11-02 16:35:08 UTC (rev 208285)
+++ trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp 2016-11-02 16:57:33 UTC (rev 208286)
@@ -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>
@@ -340,6 +342,8 @@
if (!WebProcess::singleton().networkConnection().connection().sendSync(Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad(loadParameters), Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::Reply(error, response, data), 0)) {
RELEASE_LOG_ERROR_IF_ALLOWED(loadParameters.sessionID, "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: trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp (208285 => 208286)
--- trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp 2016-11-02 16:35:08 UTC (rev 208285)
+++ trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp 2016-11-02 16:57:33 UTC (rev 208286)
@@ -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>
@@ -200,6 +204,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 (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID, m_trackingParameters.frameID, m_trackingParameters.resourceID);
+ 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;
}