W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

[Bug 13799] New: Should Transferables be transfered even when postMessage fails?

From: <bugzilla@jessica.w3.org>
Date: Tue, 16 Aug 2011 23:48:44 +0000
To: public-webapps@w3.org
Message-ID: <bug-13799-2927@http.www.w3.org/Bugs/Public/>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=13799

           Summary: Should Transferables be transfered even when
                    postMessage fails?
           Product: WebAppsWG
           Version: unspecified
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Web Messaging (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: travil@microsoft.com
         QAContact: member-webapi-cvs@w3.org
                CC: mike@w3.org, public-webapps@w3.org


Currently, in the algorithm for postMessage, step 4.2 (which occurs before the
structured clone takes place) it says:

4.If the method was invoked with a third argument transfer, run these substeps:
  2. If the transfer argument is present, then for each object in transfer in
turn, obtain a new object by transferring the object to the Window object on
which the method was invoked, and add a mapping from the old object to the new
transferred object to transfer map. If the objects are MessagePort objects,
also append the new transferred object to the new ports array.

Under these conditions, it implies that in the event of a postMessage
DATA_CLONE_ERR, the transfer-of-ownership will already have taken place, making
the objects useless (to exception-handling code).

This seems bad to lose the transferred items in this way.

If this is the intent, please add a note making this explicit.

Otherwise, please adjust the algorithm to perform the transfer at the
last-possible moment such that the transfer of ownership only occurs after any
possible exceptions have been thrown.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Tuesday, 16 August 2011 23:49:00 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:47 GMT