Closed Bug 673692 Opened 13 years ago Closed 13 years ago

postMessage fail to clone FileList, File or Blob

Categories

(Core :: JavaScript Engine, defect)

All
Other
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 664783

People

(Reporter: fred, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0a2) Gecko/20110722 Firefox/7.0a2
Build ID: 20110722195751

Steps to reproduce:

I try to send a FileList object from file API to a Worker. An minamal example is available here: http://dev.elveos.org/bug_clone_firefox


Actual results:

The postMessage method of the work fail to clone the FileList Object and return the following exception: 

[Exception... "The object could not be cloned."  code: "25" nsresult: "0x80530019 (NS_ERROR_DOM_DATA_CLONE_ERR)"  location: "http://dev.elveos.org/bug_clone_firefox/script.js Line: 6"]


Expected results:

In Chromium v12, the postMessage method correctly work, as specified in http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#transferable-objects :

If input is a FileList object
    Let output be a newly constructed FileList object containing a list of newly constructed File objects corresponding to the same underlying data as those in input, maintaining their relative order.

And

If input is a File object
    Let output be a newly constructed File object corresponding to the same underlying data.

With that feature, there is no way to use the syncronous read file API : 
http://dev.w3.org/2006/webapi/FileAPI/#FileReaderSync
We haven't implemented this stuff yet, but it's coming.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.