Bug 1389718 fix receiving a message in proxy sandbox when running OOP, r=kmag
authorShane Caraveo <scaraveo@mozilla.com>
Thu, 24 Aug 2017 12:49:56 -0700
changeset 376680 6a0fc7e6bd9830980662ef98eec8c4f54960b821
parent 376679 1c3d0a6605a39089c6c1b6e84f56a7e9fac7a80e
child 376681 115d4b8f1f0a2f1b74f5766425433bb3107003ad
push id49593
push usermixedpuppy@gmail.com
push dateThu, 24 Aug 2017 22:22:11 +0000
treeherderautoland@6a0fc7e6bd98 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag
bugs1389718
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1389718 fix receiving a message in proxy sandbox when running OOP, r=kmag MozReview-Commit-ID: xgHIph36SG
toolkit/components/extensions/ExtensionParent.jsm
toolkit/components/extensions/test/xpcshell/xpcshell-common.ini
toolkit/components/extensions/test/xpcshell/xpcshell.ini
--- 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]