Created attachment 8881991 [details] firefox_webext_document_location_bug_demo.zip 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).
Created attachment 8881992 [details] Screenshot of successful receipt of document.location 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
Last Resolved: 9 months 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.
You need to log in before you can comment on or make changes to this bug.