WebExtensions runtime.MessageSender is missing frameId

RESOLVED FIXED in Firefox 55

Status

defect
P2
normal
RESOLVED FIXED
2 years ago
Last year

People

(Reporter: tom, Assigned: zombie)

Tracking

52 Branch
mozilla55

Firefox Tracking Flags

(firefox55 fixed)

Details

(Whiteboard: triaged)

Attachments

(1 attachment)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2950.0 Iron Safari/537.36

Steps to reproduce:

1, [background page] add a listener

chrome.runtime.onMessage.addListener(function (msg, sender, respond) {
  console.log(sender);
  respond(sender.frameId);
});

2, [plugin tab] send a message

chrome.runtime.sendMessage({}, function(response) {
  console.log(response);
});


Actual results:

sender.frameId is undefined even though sender.tab is set

{
  "id":"d761a09a-81b1-48b6-b862-278dbd48d931",
  "url":"moz-extension://d761a09a-81b1-48b6-b862-278dbd48d931/....",
  "extensionId":"test@cryptup.org",
  "contextId":"1091-0",
  "tab":{...}
}


Expected results:

sender.frameId should be set as per docs below.

"frameId [Optional] integer. The frame that opened the connection. Zero for top-level frames, positive for child frames. This will only be set when tab is set."

https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/runtime/MessageSender

Tested on 52.0.2 (64-bit) / Ubuntu.

Same code does work on Chrome.
Component: Untriaged → WebExtensions: Untriaged
Product: Firefox → Toolkit
Priority: -- → P2
Whiteboard: triaged
Assignee: nobody → tomica
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment on attachment 8865168 [details]
Bug 1354337 - Add frameId to ExtensionPageChild message sender,

https://reviewboard.mozilla.org/r/136826/#review140208
Attachment #8865168 - Flags: review?(mixedpuppy) → review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/3b2a1a474990
Add frameId to ExtensionPageChild message sender, r=mixedpuppy
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/3b2a1a474990
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.