diff options
author | Adrian Perez de Castro <aperez@igalia.com> | 2019-07-15 12:24:29 +0300 |
---|---|---|
committer | Adrian Perez de Castro <aperez@igalia.com> | 2019-07-15 12:24:29 +0300 |
commit | 1a97de9759b63e6e7896799706c88aa43de236b6 (patch) | |
tree | 8064c798365a9f18b259bac96d2b77ff6ec0bc3d /embed/ephy-embed-shell.c | |
parent | 34b044c0af559270b2d92a9a1dc49f1808aeffe8 (diff) | |
download | epiphany-1a97de9759b63e6e7896799706c88aa43de236b6.tar.gz |
embed-shell: Use g_signal_connect_object everywhere
Change the remaining occurrences of g_signal_connect() to use
g_signal_connect_object() instead, which ensure that the EphyShell
instance will not be destroyed while signal handlers are being
executed.
Diffstat (limited to 'embed/ephy-embed-shell.c')
-rw-r--r-- | embed/ephy-embed-shell.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c index 73ce1f8c2..0d86a5f69 100644 --- a/embed/ephy-embed-shell.c +++ b/embed/ephy-embed-shell.c @@ -1179,30 +1179,30 @@ ephy_embed_shell_startup (GApplication *application) webkit_user_content_manager_register_script_message_handler_in_world (priv->user_content, "passwordManagerQuery", priv->guid); - g_signal_connect (priv->user_content, "script-message-received::passwordManagerQuery", - G_CALLBACK (web_process_extension_password_manager_query_received_cb), - shell); + g_signal_connect_object (priv->user_content, "script-message-received::passwordManagerQuery", + G_CALLBACK (web_process_extension_password_manager_query_received_cb), + shell, 0); webkit_user_content_manager_register_script_message_handler_in_world (priv->user_content, "passwordManagerQueryUsernames", priv->guid); - g_signal_connect (priv->user_content, "script-message-received::passwordManagerQueryUsernames", - G_CALLBACK (web_process_extension_password_manager_query_usernames_received_cb), - shell); + g_signal_connect_object (priv->user_content, "script-message-received::passwordManagerQueryUsernames", + G_CALLBACK (web_process_extension_password_manager_query_usernames_received_cb), + shell, 0); webkit_user_content_manager_register_script_message_handler_in_world (priv->user_content, "passwordManagerSave", priv->guid); - g_signal_connect (priv->user_content, "script-message-received::passwordManagerSave", - G_CALLBACK (web_process_extension_password_manager_save_received_cb), - shell); + g_signal_connect_object (priv->user_content, "script-message-received::passwordManagerSave", + G_CALLBACK (web_process_extension_password_manager_save_received_cb), + shell, 0); webkit_user_content_manager_register_script_message_handler_in_world (priv->user_content, "passwordManagerRequestSave", priv->guid); - g_signal_connect (priv->user_content, "script-message-received::passwordManagerRequestSave", - G_CALLBACK (web_process_extension_password_manager_request_save_received_cb), - shell); + g_signal_connect_object (priv->user_content, "script-message-received::passwordManagerRequestSave", + G_CALLBACK (web_process_extension_password_manager_request_save_received_cb), + shell, 0); webkit_web_context_set_process_model (priv->web_context, WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES); @@ -1271,8 +1271,8 @@ ephy_embed_shell_startup (GApplication *application) filters_dir = adblock_filters_dir (shell); priv->filters_manager = ephy_filters_manager_new (filters_dir); - g_signal_connect (priv->web_context, "download-started", - G_CALLBACK (download_started_cb), shell); + g_signal_connect_object (priv->web_context, "download-started", + G_CALLBACK (download_started_cb), shell, 0); } static void |