Closed Bug 1249830 Opened 8 years ago Closed 8 years ago

Multiple runtime.onMessage listeners unable to respond

Categories

(WebExtensions :: Untriaged, defect, P2)

46 Branch
defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla48
Iteration:
47.3 - Mar 7

People

(Reporter: marcm, Assigned: kmag)

References

Details

(Whiteboard: [runtime])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.28 Safari/537.36

Steps to reproduce:

I have two runtime.onMessage listeners, each needing the capability to respond inline via their "sendResponse" parameters.

Under Chrome, both do respond, under Firefox only the first instance does.

I'm attaching a simple WebExtension that shows the issue more clearly.


Actual results:

Only the first instance of runtime.onMessage.addListener() responds, the rest are silent.


Expected results:

All instances of runtime.onMessage.addListener() should be able to respond.  Agreed that only one can respond *at a time*, but that's up to the developer ;).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking-webextensions?
Whiteboard: [runtime]
Flags: blocking-webextensions? → blocking-webextensions+
Priority: -- → P2
Assignee: nobody → lgreco
Luca, have you already started on this?

I didn't realize it was already assigned, but I was planning to work on it.
(In reply to Kris Maglione [:kmag] from comment #1)
> Luca, have you already started on this?
> 
> I didn't realize it was already assigned, but I was planning to work on it.

I started to look into it around the end of the week (starting by exploring the components which provide the features and evaluating how far they were from the changes applied elsewhere in out WebExtensions internals).

No worries (I had the feeling that it could probably start to overlap a bit with Bug 1248497, which you were already working on).
Thanks
Assignee: lgreco → kmaglione+bmo
Iteration: --- → 47.3 - Mar 7
https://hg.mozilla.org/mozilla-central/rev/557e8160f351
Status: NEW → RESOLVED
Closed: 8 years ago
Depends on: 1220154
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
In 47.0a2 (2016-03-11) this does not appear to be fixed :(.

In the test extension above, only one message gets received by the content script, not two.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
This landed in Firefox 48. The fix isn't present in 47.
Status: REOPENED → RESOLVED
Closed: 8 years ago8 years ago
Resolution: --- → FIXED
Oh, I see.  Sorry about that.  Unfortunately this means I'll have to wait another 6 weeks to further test my extension.
You should be able to test it on 48. In any case, I plan to request uplift to 47 next week, so you shouldn't have to wait an entire 6 weeks for this to land on Aurora.
That would be great, thanks ;).
Is there any proper way of manually testing this bug?
Flags: needinfo?(kmaglione+bmo)
In this case, I think the unit tests should be enough.
Flags: needinfo?(kmaglione+bmo)
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: