Bug 239400 - Allow C API clients to get the WKProcessTerminationReason in processDidCrash functions, and use in WebKitTestRunner
Summary: Allow C API clients to get the WKProcessTerminationReason in processDidCrash ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-04-15 13:02 PDT by Simon Fraser (smfr)
Modified: 2022-04-18 14:22 PDT (History)
6 users (show)

See Also:


Attachments
Patch (24.10 KB, patch)
2022-04-15 13:07 PDT, Simon Fraser (smfr)
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (25.07 KB, patch)
2022-04-15 14:00 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2022-04-15 13:02:35 PDT
Allow C API clients to get the WKProcessTerminationReason in processDidCrash functions, and use in WebKitTestRunner
Comment 1 Simon Fraser (smfr) 2022-04-15 13:07:31 PDT
Created attachment 457718 [details]
Patch
Comment 2 Simon Fraser (smfr) 2022-04-15 14:00:21 PDT
Created attachment 457723 [details]
Patch
Comment 3 Sam Weinig 2022-04-15 15:38:20 PDT
Comment on attachment 457723 [details]
Patch

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

> Source/WebKit/UIProcess/API/C/WKContext.h:137
> +    WKContextChildProcessDidCrashWithDetailsCallback                    networkProcessDidCrashWithDetails;

How would a single one of these that gets passed a "process-kind" enum be?
Comment 4 Sam Weinig 2022-04-15 15:40:04 PDT
Comment on attachment 457723 [details]
Patch

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

>> Source/WebKit/UIProcess/API/C/WKContext.h:137
>> +    WKContextChildProcessDidCrashWithDetailsCallback                    networkProcessDidCrashWithDetails;
> 
> How would a single one of these that gets passed a "process-kind" enum be?

Or better yet, since this seems to be a pattern, a single one that gets passed a new WKObjectRef (I think that is the base name) "crash info" object that has some functions to grab the pid/reason?
Comment 5 Simon Fraser (smfr) 2022-04-15 18:06:18 PDT
Both good suggestions, but is it really worth spending effort polishing the legacy C SPI?
Comment 6 Simon Fraser (smfr) 2022-04-15 18:43:13 PDT
Alternatively we could replace this with Objective-C SPI
Comment 7 Sam Weinig 2022-04-17 15:15:59 PDT
(In reply to Simon Fraser (smfr) from comment #5)
> Both good suggestions, but is it really worth spending effort polishing the
> legacy C SPI?

I was thinking of it not as polish but as just more ergonomical for going forward, since we don't really have a path off of it.

(In reply to Simon Fraser (smfr) from comment #6)
> Alternatively we could replace this with Objective-C SPI

Isn't this used by the non-cocoa ports as well?
Comment 8 EWS 2022-04-18 14:21:35 PDT
Committed r292970 (249733@main): <https://commits.webkit.org/249733@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 457723 [details].
Comment 9 Radar WebKit Bug Importer 2022-04-18 14:22:15 PDT
<rdar://problem/91917423>