Changeset 208286 in webkit


Ignore:
Timestamp:
Nov 2, 2016 9:57:33 AM (7 years ago)
Author:
ddkilzer@apple.com
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.
Location:
trunk/Source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r208281 r208286  
     12016-11-02  David Kilzer  <ddkilzer@apple.com>
     2
     3        Add logging for "WebKit encountered an internal error" messages
     4        <https://webkit.org/b/164272>
     5        <rdar://problem/28546064>
     6
     7        Reviewed by Alex Christensen.
     8
     9        * page/DiagnosticLoggingKeys.cpp:
     10        (WebCore::DiagnosticLoggingKeys::internalErrorKey):
     11        (WebCore::DiagnosticLoggingKeys::invalidSessionIDKey):
     12        (WebCore::DiagnosticLoggingKeys::createSharedBufferFailedKey):
     13        (WebCore::DiagnosticLoggingKeys::synchronousMessageFailedKey):
     14        - Add implementations for new key methods.
     15
     16        * page/DiagnosticLoggingKeys.h:
     17        (WebCore::DiagnosticLoggingKeys::internalErrorKey):
     18        (WebCore::DiagnosticLoggingKeys::invalidSessionIDKey):
     19        (WebCore::DiagnosticLoggingKeys::createSharedBufferFailedKey):
     20        (WebCore::DiagnosticLoggingKeys::synchronousMessageFailedKey):
     21        - Add declarations for new key methods.
     22
    1232016-11-02  Zalan Bujtas  <zalan@apple.com>
    224
  • trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp

    r193756 r208286  
    234234}
    235235
     236String DiagnosticLoggingKeys::internalErrorKey()
     237{
     238    return ASCIILiteral("internalError");
     239}
     240
     241String DiagnosticLoggingKeys::invalidSessionIDKey()
     242{
     243    return ASCIILiteral("invalidSessionID");
     244}
     245
    236246String DiagnosticLoggingKeys::isAttachmentKey()
    237247{
     
    289299}
    290300
     301String DiagnosticLoggingKeys::createSharedBufferFailedKey()
     302{
     303    return ASCIILiteral("createSharedBufferFailed");
     304}
     305
    291306String DiagnosticLoggingKeys::deltaKey()
    292307{
     
    444459}
    445460
     461String DiagnosticLoggingKeys::synchronousMessageFailedKey()
     462{
     463    return ASCIILiteral("synchronousMessageFailed");
     464}
     465
    446466String DiagnosticLoggingKeys::uncacheableStatusCodeKey()
    447467{
  • trunk/Source/WebCore/page/DiagnosticLoggingKeys.h

    r208179 r208286  
    3939    static String canCacheKey();
    4040    static String cannotSuspendActiveDOMObjectsKey();
     41    WEBCORE_EXPORT static String createSharedBufferFailedKey();
    4142    WEBCORE_EXPORT static String deltaKey();
    4243    static String deniedByClientKey();
     
    5657    static String imageKey();
    5758    static String inMemoryCacheKey();
     59    WEBCORE_EXPORT static String internalErrorKey();
     60    WEBCORE_EXPORT static String invalidSessionIDKey();
    5861    WEBCORE_EXPORT static String isAttachmentKey();
    5962    WEBCORE_EXPORT static String isConditionalRequestKey();
     
    120123    WEBCORE_EXPORT static String successfulSpeculativeWarmupWithoutRevalidationKey();
    121124    static String svgDocumentKey();
     125    WEBCORE_EXPORT static String synchronousMessageFailedKey();
    122126    WEBCORE_EXPORT static String uncacheableStatusCodeKey();
    123127    static String underMemoryPressureKey();
  • trunk/Source/WebKit2/ChangeLog

    r208285 r208286  
     12016-11-02  David Kilzer  <ddkilzer@apple.com>
     2
     3        Add logging for "WebKit encountered an internal error" messages
     4        <https://webkit.org/b/164272>
     5        <rdar://problem/28546064>
     6
     7        Reviewed by Alex Christensen.
     8
     9        * NetworkProcess/NetworkResourceLoader.cpp:
     10        (WebKit::NetworkResourceLoader::startNetworkLoad):
     11        * WebProcess/Network/WebLoaderStrategy.cpp:
     12        (WebKit::WebLoaderStrategy::loadResourceSynchronously):
     13        * WebProcess/Network/WebResourceLoader.cpp:
     14        (WebKit::WebResourceLoader::didReceiveResource):
     15        - Add logging for various internalError() events.
     16
    1172016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
    218
  • trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp

    r208174 r208286  
    4141#include <WebCore/BlobDataFileReference.h>
    4242#include <WebCore/CertificateInfo.h>
     43#include <WebCore/DiagnosticLoggingKeys.h>
    4344#include <WebCore/HTTPHeaderNames.h>
    4445#include <WebCore/ProtectionSpace.h>
     
    223224        WTFLogAlways("Attempted to create a NetworkLoad with a session (id=%" PRIu64 ") that does not exist.", parameters.sessionID.sessionID());
    224225        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());
     226        NetworkProcess::singleton().logDiagnosticMessage(m_parameters.webPageID, WebCore::DiagnosticLoggingKeys::internalErrorKey(), WebCore::DiagnosticLoggingKeys::invalidSessionIDKey(), WebCore::ShouldSample::No);
    225227        didFailLoading(internalError(request.url()));
    226228        return;
  • trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp

    r207414 r208286  
    4343#include <WebCore/ApplicationCacheHost.h>
    4444#include <WebCore/CachedResource.h>
     45#include <WebCore/DiagnosticLoggingClient.h>
     46#include <WebCore/DiagnosticLoggingKeys.h>
    4547#include <WebCore/Document.h>
    4648#include <WebCore/DocumentLoader.h>
     
    341343    if (!WebProcess::singleton().networkConnection().connection().sendSync(Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad(loadParameters), Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::Reply(error, response, data), 0)) {
    342344        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);
     345        if (auto* page = webPage->corePage())
     346            page->diagnosticLoggingClient().logDiagnosticMessage(WebCore::DiagnosticLoggingKeys::internalErrorKey(), WebCore::DiagnosticLoggingKeys::synchronousMessageFailedKey(), WebCore::ShouldSample::No);
    343347        response = ResourceResponse();
    344348        error = internalError(request.url());
  • trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp

    r206762 r208286  
    3636#include <WebCore/ApplicationCacheHost.h>
    3737#include <WebCore/CertificateInfo.h>
     38#include <WebCore/DiagnosticLoggingClient.h>
     39#include <WebCore/DiagnosticLoggingKeys.h>
    3840#include <WebCore/DocumentLoader.h>
     41#include <WebCore/Frame.h>
     42#include <WebCore/Page.h>
    3943#include <WebCore/ResourceError.h>
    4044#include <WebCore/ResourceLoader.h>
     
    201205        LOG_ERROR("Unable to create buffer from ShareableResource sent from the network process.");
    202206        RELEASE_LOG_IF_ALLOWED("didReceiveResource: Unable to create SharedBuffer (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID, m_trackingParameters.frameID, m_trackingParameters.resourceID);
     207        if (auto* frame = m_coreLoader->frame()) {
     208            if (auto* page = frame->page())
     209                page->diagnosticLoggingClient().logDiagnosticMessage(WebCore::DiagnosticLoggingKeys::internalErrorKey(), WebCore::DiagnosticLoggingKeys::createSharedBufferFailedKey(), WebCore::ShouldSample::No);
     210        }
    203211        m_coreLoader->didFail(internalError(m_coreLoader->request().url()));
    204212        return;
Note: See TracChangeset for help on using the changeset viewer.