Summary: | [GTK] MiniBrowser: add an option to quit the browser after loading finishes | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Carlos Garcia Campos <cgarcia> | ||||
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bugs-noreply, clopez, svillar | ||||
Priority: | P2 | Keywords: | Gtk | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=219737 | ||||||
Attachments: |
|
Description
Carlos Garcia Campos
2020-11-18 06:16:30 PST
Created attachment 414444 [details]
Patch
Comment on attachment 414444 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=414444&action=review > Tools/MiniBrowser/gtk/main.c:594 > +static void exitAfterWebProcessCrashed(WebKitWebView *webView, WebKitWebProcessTerminationReason reason, GApplication *application) > +{ > + if (reason == WEBKIT_WEB_PROCESS_CRASHED) > + exitAfterWebViewLoadFinishesCallback(webView, WEBKIT_LOAD_FINISHED, application); In this case I think it will be useful to print an error message saying that the webprocess has crashed. Otherwise it can be confusing, and the user can't easily tell if the minibrowser is exiting because the load has finished correctly or because of a crash from the webprocess. Also setting a non-zero exit code in this case can be also useful for tests. Comment on attachment 414444 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=414444&action=review >> Tools/MiniBrowser/gtk/main.c:594 >> + exitAfterWebViewLoadFinishesCallback(webView, WEBKIT_LOAD_FINISHED, application); > > In this case I think it will be useful to print an error message saying that the webprocess has crashed. > Otherwise it can be confusing, and the user can't easily tell if the minibrowser is exiting because the load has finished correctly or because of a crash from the webprocess. > Also setting a non-zero exit code in this case can be also useful for tests. The message is always printed by the webProcessTerminatedCallback() in BrowserTab.c. I think it's a good idea to exit(1) instead of g_application_quit(). Committed r270186: <https://trac.webkit.org/changeset/270186> |