summaryrefslogtreecommitdiffstats
path: root/toolkit/components/webextensions/ExtensionCommon.jsm
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/webextensions/ExtensionCommon.jsm')
-rw-r--r--toolkit/components/webextensions/ExtensionCommon.jsm3
1 files changed, 1 insertions, 2 deletions
diff --git a/toolkit/components/webextensions/ExtensionCommon.jsm b/toolkit/components/webextensions/ExtensionCommon.jsm
index a339fb27e..9ec84b5c7 100644
--- a/toolkit/components/webextensions/ExtensionCommon.jsm
+++ b/toolkit/components/webextensions/ExtensionCommon.jsm
@@ -197,10 +197,9 @@ class BaseContext {
* @returns {Promise}
*/
sendMessage(target, messageName, data, options = {}) {
- options.recipient = options.recipient || {};
+ options.recipient = Object.assign({extensionId: this.extension.id}, options.recipient);
options.sender = options.sender || {};
- options.recipient.extensionId = this.extension.id;
options.sender.extensionId = this.extension.id;
options.sender.contextId = this.contextId;