Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commitc14d50f1da273620944f2f60a3af43d3d9f35c57 (patch)
Author
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2019-04-13 20:29:34 +0200
Committer
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2019-04-13 20:33:30 +0200
Files130c4443b3bfaaa13f1dfe182a64c15b135e480a
goodwolf-c14d50f1da273620944f2f60a3af43d3d9f35c57.tar
goodwolf-c14d50f1da273620944f2f60a3af43d3d9f35c57.tar.gz
goodwolf-c14d50f1da273620944f2f60a3af43d3d9f35c57.zip
Parent0728f8a127f4dc14e438b9912feefc2799aa8ba2 (diff)
WebViewCb_web_process_terminated: Change tab’s title with the reason
1 files changed, 5 insertions, 6 deletions
-rw-r--r--badwolf.c11
diff --git a/badwolf.c b/badwolf.c
index 7c24ae0..502dfce 100644
--- a/badwolf.c
+++ b/badwolf.c
@@ -87,19 +87,18 @@ static gboolean
WebViewCb_web_process_terminated(WebKitWebView *webView, WebKitWebProcessTerminationReason reason)
{
(void)webView;
- char *str_reason;
switch(reason)
{
- case WEBKIT_WEB_PROCESS_CRASHED: str_reason = "the web process crashed."; break;
+ case WEBKIT_WEB_PROCESS_CRASHED: g_fprintf(stderr, "the web process crashed."; webView_tab_label_change(browser, "Crashed"); break;
case WEBKIT_WEB_PROCESS_EXCEEDED_MEMORY_LIMIT:
- str_reason = "the web process exceeded the memory limit.";
+ g_fprintf(stderr, "the web process exceeded the memory limit.";
+ webView_tab_label_change(browser, "Out of Memory");
break;
- default: str_reason = "the web process terminated for an unknown reason.";
+ default: g_fprintf(stderr, "the web process terminated for an unknown reason.");
+ webView_tab_label_change(browser, "Unknown Crash");
}
- g_fprintf(stderr, "BadWolf [signal: web-process-terminated]: %s\n", str_reason);
-
return FALSE;
}