Bug 181410 - Add WKNavigationDelegate SPI exposing WebProcess crash reason
Summary: Add WKNavigationDelegate SPI exposing WebProcess crash reason
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-01-08 15:47 PST by Alex Christensen
Modified: 2018-01-08 19:28 PST (History)
2 users (show)

See Also:


Attachments
Patch (9.39 KB, patch)
2018-01-08 15:48 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (9.62 KB, patch)
2018-01-08 19:11 PST, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2018-01-08 15:47:14 PST
Add WKNavigationDelegate SPI exposing WebProcess crash reason
Comment 1 Alex Christensen 2018-01-08 15:48:15 PST
Created attachment 330747 [details]
Patch
Comment 2 Wenson Hsieh 2018-01-08 19:05:51 PST
Comment on attachment 330747 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=330747&action=review

> Source/WebKit/UIProcess/Cocoa/NavigationState.mm:894
> +static _WKProcessTerminationReason toWKProcessTerminationReason(ProcessTerminationReason reason)

Nit - I think WebKit style guidelines recommend not having the "to" prefix (https://webkit.org/code-style-guidelines/#names-verb). Maybe processTerminationReason is sufficient?

> Source/WebKit/UIProcess/Cocoa/NavigationState.mm:927
> +    if (m_navigationState.m_navigationDelegateMethods.webViewWebContentProcessDidTerminateWithReason) {

Nit - Maybe this should go ahead of the webViewWebContentProcessDidTerminate check, so that if a delegate implements both versions, the SPI version is preferred. Or maybe this doesn't really matter :P
Comment 3 Alex Christensen 2018-01-08 19:11:44 PST
Created attachment 330779 [details]
Patch
Comment 4 Alex Christensen 2018-01-08 19:27:34 PST
http://trac.webkit.org/r226610
Comment 5 Radar WebKit Bug Importer 2018-01-08 19:28:25 PST
<rdar://problem/36367341>