Closed Bug 1370884 Opened 7 years ago Closed 7 years ago

postMessage throws DataCloneError: The object could not be cloned.

Categories

(WebExtensions :: General, defect)

55 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: anthony, Unassigned)

References

Details

(Keywords: nightly-community, Whiteboard: [mozfr-community])

Attachments

(1 file)

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

Steps to reproduce:

I tried to send an Object through a port using postMessage({}).

The object is structured like this

{
   "desc": "some_description",
   "name": "some_name",
   "errors": [{"msg": "article_length_info", "msgParams": ["317","1"], "type":3}]
}

With more or less element in the table.




Actual results:

An error is returned : DataCloneError: The object could not be cloned.


Expected results:

The object should have been transferred without any hassle. It was working yesterday (6th of June 2017) on Nightly, so I guess some patch broke it during the night.
Blocks: 1356546
Summary: Webextensions → postMessage throws DataCloneError: The object could not be cloned.
Whiteboard: [mozfr-community]
Can you please attach a testcase add-on that shows the problem?
This is not really test case but it triggers the issue. 
I'll try to reduce it to a minimal use case.
Flags: needinfo?(kmaglione+bmo)
It looks like you're trying to send an object that contains a function property. We used to (accidentally) ignore those properties as a byproduct of the cloning being done through security wrappers, but they were never supported.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Flags: needinfo?(kmaglione+bmo)
Resolution: --- → WONTFIX
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: