Changeset 282611 in webkit


Ignore:
Timestamp:
Sep 16, 2021, 3:46:32 PM (4 years ago)
Author:
Chris Dumez
Message:

Stringify process termination reason in dispatchProcessDidTerminate logging
https://bugs.webkit.org/show_bug.cgi?id=230361

Reviewed by Geoffrey Garen.

  • UIProcess/WebPageProxy.cpp:

(WebKit::processTerminationReasonToString):
(WebKit::WebPageProxy::dispatchProcessDidTerminate):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r282604 r282611  
     12021-09-16  Chris Dumez  <cdumez@apple.com>
     2
     3        Stringify process termination reason in dispatchProcessDidTerminate logging
     4        https://bugs.webkit.org/show_bug.cgi?id=230361
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * UIProcess/WebPageProxy.cpp:
     9        (WebKit::processTerminationReasonToString):
     10        (WebKit::WebPageProxy::dispatchProcessDidTerminate):
     11
    1122021-09-16  Chris Dumez  <cdumez@apple.com>
    213
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r282567 r282611  
    77567756}
    77577757
     7758static const char* processTerminationReasonToString(ProcessTerminationReason reason)
     7759{
     7760    switch (reason) {
     7761    case ProcessTerminationReason::ExceededMemoryLimit:
     7762        return "ExceededMemoryLimit";
     7763    case ProcessTerminationReason::ExceededCPULimit:
     7764        return "ExceededCPULimit";
     7765    case ProcessTerminationReason::RequestedByNetworkProcess:
     7766        return "RequestedByNetworkProcess";
     7767    case ProcessTerminationReason::RequestedByGPUProcess:
     7768        return "RequestedByGPUProcess";
     7769    case ProcessTerminationReason::ExceededProcessCountLimit:
     7770        return "ExceededProcessCountLimit";
     7771    case ProcessTerminationReason::NavigationSwap:
     7772        return "NavigationSwap";
     7773    case ProcessTerminationReason::RequestedByClient:
     7774        return "RequestedByClient";
     7775    case ProcessTerminationReason::Crash:
     7776        break;
     7777    }
     7778    return "Crash";
     7779}
     7780
    77587781void WebPageProxy::dispatchProcessDidTerminate(ProcessTerminationReason reason)
    77597782{
    7760     WEBPAGEPROXY_RELEASE_LOG_ERROR(Loading, "dispatchProcessDidTerminate: reason=%d", reason);
     7783    WEBPAGEPROXY_RELEASE_LOG_ERROR(Loading, "dispatchProcessDidTerminate: reason=%{public}s", processTerminationReasonToString(reason));
    77617784
    77627785    bool handledByClient = false;
Note: See TracChangeset for help on using the changeset viewer.