diff options
author | Carlos Garcia Campos <cgarcia@igalia.com> | 2013-02-20 00:13:51 +0800 |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2013-02-21 16:05:16 +0800 |
commit | 8ec71c6a3b9f2ab3f10b1eef201f758bdb44e21f (patch) | |
tree | f2680267526abbd776b8a9b0181357e3dcd00454 /embed | |
parent | 892b1d2649776dac118622a59cf827c7f1b51811 (diff) | |
download | gsoc2013-epiphany-8ec71c6a3b9f2ab3f10b1eef201f758bdb44e21f.tar gsoc2013-epiphany-8ec71c6a3b9f2ab3f10b1eef201f758bdb44e21f.tar.gz gsoc2013-epiphany-8ec71c6a3b9f2ab3f10b1eef201f758bdb44e21f.tar.bz2 gsoc2013-epiphany-8ec71c6a3b9f2ab3f10b1eef201f758bdb44e21f.tar.lz gsoc2013-epiphany-8ec71c6a3b9f2ab3f10b1eef201f758bdb44e21f.tar.xz gsoc2013-epiphany-8ec71c6a3b9f2ab3f10b1eef201f758bdb44e21f.tar.zst gsoc2013-epiphany-8ec71c6a3b9f2ab3f10b1eef201f758bdb44e21f.zip |
web-extension: Use a different service name for every web process extension
Diffstat (limited to 'embed')
-rw-r--r-- | embed/ephy-embed-shell.c | 6 | ||||
-rw-r--r-- | embed/web-extension/ephy-web-extension.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c index 7f48f7c2e..e5aa18ef0 100644 --- a/embed/ephy-embed-shell.c +++ b/embed/ephy-embed-shell.c @@ -697,14 +697,18 @@ ephy_embed_shell_get_web_extension_proxy (EphyEmbedShell *shell) priv = shell->priv; if (!priv->web_extension) { + char *service_name; + + service_name = g_strdup_printf ("%s-%u", EPHY_WEB_EXTENSION_SERVICE_NAME, getpid ()); priv->web_extension = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START, NULL, - EPHY_WEB_EXTENSION_SERVICE_NAME, + service_name, EPHY_WEB_EXTENSION_OBJECT_PATH, EPHY_WEB_EXTENSION_INTERFACE, NULL, NULL); + g_free (service_name); } return priv->web_extension; diff --git a/embed/web-extension/ephy-web-extension.c b/embed/web-extension/ephy-web-extension.c index 1650026a3..8eb93e8a7 100644 --- a/embed/web-extension/ephy-web-extension.c +++ b/embed/web-extension/ephy-web-extension.c @@ -159,11 +159,15 @@ bus_acquired_cb (GDBusConnection *connection, G_MODULE_EXPORT void webkit_web_extension_initialize (WebKitWebExtension *extension) { + char *service_name; + + service_name = g_strdup_printf ("%s-%s", EPHY_WEB_EXTENSION_SERVICE_NAME, g_getenv ("EPHY_WEB_EXTENSION_ID")); g_bus_own_name (G_BUS_TYPE_SESSION, - EPHY_WEB_EXTENSION_SERVICE_NAME, + service_name, G_BUS_NAME_OWNER_FLAGS_NONE, bus_acquired_cb, NULL, NULL, g_object_ref (extension), (GDestroyNotify)g_object_unref); + g_free (service_name); } |