Bug 205564 - Provide pid to crashing service worker process and GPU process
Summary: Provide pid to crashing service worker process and GPU process
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Service Workers (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-12-23 12:01 PST by youenn fablet
Modified: 2020-01-05 02:20 PST (History)
5 users (show)

See Also:


Attachments
Patch (11.99 KB, patch)
2019-12-23 12:20 PST, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2019-12-23 12:01:28 PST
Provide pid to crashing service worker process and GPU process
Comment 1 youenn fablet 2019-12-23 12:20:35 PST
Created attachment 386348 [details]
Patch
Comment 2 Darin Adler 2019-12-26 20:41:37 PST
Comment on attachment 386348 [details]
Patch

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

> Source/WebKit/ChangeLog:8
> +        No change of behavior, we provide pids to the WKContext callbacks.

Why are we doing this to the C API rather than the Objective-C/Swift API?
Comment 3 youenn fablet 2019-12-27 01:24:03 PST
(In reply to Darin Adler from comment #2)
> Comment on attachment 386348 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=386348&action=review
> 
> > Source/WebKit/ChangeLog:8
> > +        No change of behavior, we provide pids to the WKContext callbacks.
> 
> Why are we doing this to the C API rather than the Objective-C/Swift API?

We could do both but the only use case is to allow better WebKitTestRunner error reporting and the API in use is the cross platform C API.
Comment 4 Alex Christensen 2020-01-02 10:57:04 PST
Comment on attachment 386348 [details]
Patch

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

> Source/WebKit/UIProcess/API/C/WKContext.h:60
>  typedef void (*WKContextChildProcessDidCrashCallback)(WKContextRef context, const void *clientInfo);
>  typedef WKContextChildProcessDidCrashCallback WKContextNetworkProcessDidCrashCallback;

Are these still needed.

> Source/WebKit/UIProcess/API/C/WKContext.h:116
> -    WKContextChildProcessDidCrashCallback                               serviceWorkerProcessDidCrash;
> -    WKContextChildProcessDidCrashCallback                               gpuProcessDidCrash;
> +    WKContextChildProcessWithPIDDidCrashCallback                        serviceWorkerProcessDidCrash;
> +    WKContextChildProcessWithPIDDidCrashCallback                        gpuProcessDidCrash;

This is not a binary-compatible change.  Do we have any clients using these except WebKitTestRunner?  If so, we will need to add WKContextClientV4
Comment 5 youenn fablet 2020-01-03 01:39:00 PST
Comment on attachment 386348 [details]
Patch

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

>> Source/WebKit/UIProcess/API/C/WKContext.h:60
>>  typedef WKContextChildProcessDidCrashCallback WKContextNetworkProcessDidCrashCallback;
> 
> Are these still needed.

Yes, WKContextNetworkProcessDidCrashCallback is still in use.

>> Source/WebKit/UIProcess/API/C/WKContext.h:116
>> +    WKContextChildProcessWithPIDDidCrashCallback                        gpuProcessDidCrash;
> 
> This is not a binary-compatible change.  Do we have any clients using these except WebKitTestRunner?  If so, we will need to add WKContextClientV4

serviceWorkerProcessDidCrash and gpuProcessDidCrash have been recently added mid December 2019 and at that time, the version was incremented.
Comment 6 WebKit Commit Bot 2020-01-03 10:05:02 PST
Comment on attachment 386348 [details]
Patch

Clearing flags on attachment: 386348

Committed r254006: <https://trac.webkit.org/changeset/254006>
Comment 7 WebKit Commit Bot 2020-01-03 10:05:04 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2020-01-03 10:06:20 PST
<rdar://problem/58300321>
Comment 9 Alex Christensen 2020-01-03 11:22:33 PST
Comment on attachment 386348 [details]
Patch

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

> Source/WebKit/UIProcess/API/C/WKContext.h:62
> +using WKContextChildProcessWithPIDDidCrashCallback = void (*)(WKContextRef, WKProcessID, const void *clientInfo);

As pointed out by Keith Rollin, this line needs to be as follows because this is a C API:

typedef void (*WKContextChildProcessWithPIDDidCrashCallback)(WKContextRef context, WKProcessID processID, const void *clientInfo);
Comment 10 Dean Jackson 2020-01-03 13:54:21 PST
Fixed in r254012
Comment 11 youenn fablet 2020-01-05 02:20:43 PST
(In reply to Dean Jackson from comment #10)
> Fixed in r254012

Thanks!