chrome.runtime.onMessage handler in moz-extension pages not removed

RESOLVED DUPLICATE of bug 1284942

Status

RESOLVED DUPLICATE of bug 1284942
2 years ago
4 months ago

People

(Reporter: markus.hartung, Unassigned)

Tracking

50 Branch

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.70 Safari/537.36

Steps to reproduce:

See https://github.com/markus-hartung-avira/web-ext-messaging-bug for demo extension

1. Registered a hanlder for chrome.runtime.onMessage in a moz-extensions page that accesses a property on the message object.
2. Navigated away from the extension page to some other page where a content script is inserted
3. Using chrome.runtime.sendMessage send a message from the content script


Actual results:

The handler in the moz-extensions page is still there and recieves the message, but throws the exception:
Unchecked lastError value: Error: Permission denied to access property "content"
The content script receives undefined as response


Expected results:

When navigating away from the moz-extensions page the handler should be automatically removed.
(Reporter)

Comment 1

2 years ago
Might be somewhat related to https://bugzilla.mozilla.org/show_bug.cgi?id=1286124 , but is not really the same issue.

Updated

2 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1284942

Updated

4 months ago
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.