This only happens within the same App. When calling SystemMessageInternal.sendMessage(), it would send the message to all the pages that used to be registered in the _listeners[aManifestURI.spec], which is wrong. I think we need to add a check in the SystemMessageManager to handle only the message that has the matched page URI; otherwise, ignore it. This fix can also prevent this page from wrongly clearing the pending messages in other pages when sending back an acknowledgement later.
Created attachment 671050 [details] [diff] [review] Patch Hi Fabrice, Could you please review this when you have a chance? Changes are trivial. Please see comment #0 for why we need to fix that. In summary, pageA would wrongly handle the message that should be sent to pageB (within the same App). Thanks Fabrice again!
Created attachment 671051 [details] [diff] [review] Patch 1.1 NIT: add braces for one line if-block.
Created attachment 671052 [details] [diff] [review] Patch 1.1
Attachment #671052 - Flags: review?(fabrice) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/37fead15ae60 Should this have a test?
No, thanks. :)
Flags: in-testsuite? → in-testsuite-
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
status-firefox18: --- → fixed
status-firefox19: --- → fixed
You need to log in before you can comment on or make changes to this bug.