Closed Bug 1376969 Opened 7 years ago Closed 7 years ago

Sending document.location with chrome.runtime.sendMessage broken in Firefox 55

Categories

(WebExtensions :: Untriaged, defect)

55 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: alexeiatyahoodotcom+mzllbgzll, Unassigned)

Details

(Keywords: addon-compat)

Attachments

(2 files)

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

Steps to reproduce:

As of Firefox 55 (currently in Beta), serializing document.location fails when trying to send it from a content script to a background page with chrome.runtime.sendMessage.

Please see the attached zip for a demo add-on illustrating this issue.


Actual results:

Nothing is sent, and I don't see any errors either.


Expected results:

Sending succeeds (see attached screenshot of the received object in Firefox 54).
`document.location` is a DOM object, which is not clonable. If you want to send a location in a message, please use `location.href` instead.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
This works in Firefox 54 and below, and works in Chrome. Do you see that this is a breaking, Firefox-specific change?
It worked in Firefox 54 and below, for certain values of "worked", by accident, and at the expense of other things that should have worked not working.

In 55 and above, we follow the standardized structured clone semantics, which don't allow cloning DOM objects.
Cool, just making sure it's clear this change may break add-ons.
Keywords: addon-compat
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: