WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
180862
[GTK][WPE] Add WebKitWebView::web-process-terminated signal and deprecate web-process-crashed
https://bugs.webkit.org/show_bug.cgi?id=180862
Summary
[GTK][WPE] Add WebKitWebView::web-process-terminated signal and deprecate web...
Carlos Garcia Campos
Reported
2017-12-15 03:33:37 PST
Once the memory pressure web process monitor is enabled in
bug #180861
the web process can be killed due to memory limits. We need to expose the reason of the web process termination to allow applications handle the memory limit case. Epiphany might want to use an error page similar to the crash one, but explaining that the process was killed due to high memory used, but other applications might want to simply reload the web process silently.
Attachments
Patch
(13.56 KB, patch)
2017-12-15 03:37 PST
,
Carlos Garcia Campos
mcatanzaro
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2017-12-15 03:37:51 PST
Created
attachment 329484
[details]
Patch WebKitWebProcessTerminationReason can be expanded to support ExceededCPULimit if we enable that.
EWS Watchlist
Comment 2
2017-12-15 05:29:41 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See
http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Michael Catanzaro
Comment 3
2017-12-15 08:45:43 PST
(In reply to Carlos Garcia Campos from
comment #1
)
> WebKitWebProcessTerminationReason can be expanded to support > ExceededCPULimit if we enable that.
We should definitely enable that, too.
Michael Catanzaro
Comment 4
2017-12-15 08:52:07 PST
Comment on
attachment 329484
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=329484&action=review
I thought about recommending that we adjust the API for the possibility that, in the future, we might want to notify the UI process if other secondary processes terminate. The signal could be SECONDARY_PROCESS_TERMINATED or just PROCESS_TERMINATED instead of WEB_PROCESS_TERMINATED. But I doubt we'll ever need to do that, and this seems clearer.
> Source/WebKit/UIProcess/API/gtk/WebKitWebView.h:191 > + * @WEBKIT_WEB_PROCESS_CRAHED: the web process crashed.
CRASHED
> Source/WebKit/UIProcess/API/wpe/WebKitWebView.h:166 > + WEBKIT_WEB_PROCESS_CRAHED,
Ditto.
> Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp:86 > + g_assert_cmpuint(reason, ==, WEBKIT_WEB_PROCESS_CRAHED);
You have to look after you Ctrl+V :P
Carlos Garcia Campos
Comment 5
2017-12-16 03:25:17 PST
(In reply to Michael Catanzaro from
comment #3
)
> (In reply to Carlos Garcia Campos from
comment #1
) > > WebKitWebProcessTerminationReason can be expanded to support > > ExceededCPULimit if we enable that. > > We should definitely enable that, too.
Yes, but maybe we a way to disable it.
Carlos Garcia Campos
Comment 6
2017-12-16 03:26:12 PST
(In reply to Michael Catanzaro from
comment #4
)
> Comment on
attachment 329484
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=329484&action=review
> > I thought about recommending that we adjust the API for the possibility > that, in the future, we might want to notify the UI process if other > secondary processes terminate. The signal could be > SECONDARY_PROCESS_TERMINATED or just PROCESS_TERMINATED instead of > WEB_PROCESS_TERMINATED.
In the case of other secondary processes, for example the network process, the signal wouldn't belong to the web view, but to the web context.
> But I doubt we'll ever need to do that, and this seems clearer. > > > Source/WebKit/UIProcess/API/gtk/WebKitWebView.h:191 > > + * @WEBKIT_WEB_PROCESS_CRAHED: the web process crashed. > > CRASHED > > > Source/WebKit/UIProcess/API/wpe/WebKitWebView.h:166 > > + WEBKIT_WEB_PROCESS_CRAHED, > > Ditto. > > > Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp:86 > > + g_assert_cmpuint(reason, ==, WEBKIT_WEB_PROCESS_CRAHED); > > You have to look after you Ctrl+V :P
Indeed
Carlos Garcia Campos
Comment 7
2017-12-18 00:55:24 PST
Committed
r226019
: <
https://trac.webkit.org/changeset/226019
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug