Commit 94e18ebe authored by Michael Catanzaro's avatar Michael Catanzaro
Browse files

Web process extension must always create a custom script world

This code is currently unreachable beacuse guid is always sent when
initializing the web process. But if it were not unreachable, it would
be a major security issue, because Epiphany internal APIs would be
exposed to the web. So let's remove this.

I think this was maybe a leftover from an earlier draft of the
WebExtension branch that perhaps attempted to use a separate
EphyWebProcessExtension for each WebExtension? Regardless, it's not
going to work.
parent 3475a67a
Pipeline #253001 passed with stages
in 17 minutes and 21 seconds
......@@ -793,11 +793,7 @@ ephy_web_process_extension_initialize (EphyWebProcessExtension *extension,
extension->initialized = TRUE;
/* Note: An empty guid is used ONLY for WebExtensions which do have an own initialization function */
if (strlen (guid) > 0)
extension->script_world = webkit_script_world_new_with_name (guid);
else
extension->script_world = webkit_script_world_get_default ();
extension->script_world = webkit_script_world_new_with_name (guid);
g_signal_connect (extension->script_world,
"window-object-cleared",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment