Bug 1389718 fix receiving a message in proxy sandbox when running OOP, r?kmag
MozReview-Commit-ID: xgHIph36SG
--- a/toolkit/components/extensions/ExtensionParent.jsm
+++ b/toolkit/components/extensions/ExtensionParent.jsm
@@ -219,24 +219,24 @@ ProxyMessenger = {
}
let promise1 = MessageChannel.sendMessage(receiverMM, messageName, data, {
sender,
recipient,
responseType,
});
- if (!extension.isEmbedded || !extension.remote) {
+ if (!(extension.isEmbedded || recipient.toProxyScript) || !extension.remote) {
return promise1;
}
- // If we have a remote, embedded extension, the legacy side is
- // running in a different process than the WebExtension side.
- // As a result, we need to dispatch the message to both the parent
- // and extension processes, and manually merge the results.
+ // If we have a proxy script sandbox or a remote, embedded extension, where
+ // the legacy side is running in a different process than the WebExtension
+ // side. As a result, we need to dispatch the message to both the parent and
+ // extension processes, and manually merge the results.
let promise2 = MessageChannel.sendMessage(Services.ppmm.getChildAt(0), messageName, data, {
sender,
recipient,
responseType,
});
let result = undefined;
let failures = 0;
--- a/toolkit/components/extensions/test/xpcshell/xpcshell-common.ini
+++ b/toolkit/components/extensions/test/xpcshell/xpcshell-common.ini
@@ -64,8 +64,9 @@ skip-if = os == "android"
[test_ext_storage_sync_crypto.js]
skip-if = os == "android"
[test_ext_storage_telemetry.js]
skip-if = os == "android" # checking for telemetry needs to be updated: 1384923
[test_ext_topSites.js]
skip-if = os == "android"
[test_native_messaging.js]
skip-if = os == "android"
+[test_proxy_scripts.js]
--- a/toolkit/components/extensions/test/xpcshell/xpcshell.ini
+++ b/toolkit/components/extensions/test/xpcshell/xpcshell.ini
@@ -47,12 +47,10 @@ tags = webextensions in-process-webexten
[test_ext_unknown_permissions.js]
[test_locale_converter.js]
[test_locale_data.js]
[test_ext_permissions.js]
skip-if = os == "android" # Bug 1350559
[test_ext_runtime_sendMessage_args.js]
-[test_proxy_scripts.js]
-
[include:xpcshell-common.ini]
[include:xpcshell-content.ini]