[Bug 12947] New: Extend postMessage to support general transfer-of-ownership semantics

http://www.w3.org/Bugs/Public/show_bug.cgi?id=12947

           Summary: Extend postMessage to support general
                    transfer-of-ownership semantics
           Product: WebAppsWG
           Version: unspecified
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P1
         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, jonas@sicking.cc,
                    atwilson@google.com, adrianba@microsoft.com,
                    kbr@google.com, bent.mozilla@gmail.com,
                    travil@microsoft.com, glenn@zewt.org


This is a summary of the full discussion here:
http://lists.w3.org/Archives/Public/public-webapps/2011AprJun/0304.html

This bug proposes some modifications to the postMessage API to allow it to
support generic "transfer-of-ownership" semantics for ArrayBuffer (TypedArray
specification) and other transferrable objects in the future, in a
backwards-compatible way with existing implementations of postMessage.

The changes are as follows:
1. The 2nd parameter to postMessage shall be generalized to be an array of
"Transferrable" types, of which MessagePort will become the first derived type.
2. The spec should define generally what the cloning process of Transferrable
objects is, but might leave the specifics up to the specs that derive objects
from this generic type. In general, objects located in the Transferrable[]
array will be references to object instances in the data payload (param 1), and
act as an opt-in flag for transfer-of-ownership behavior. If a transferrable
object is found in the data payload, but it is not in the list of transferrable
objects, then that object will be cloned as defined in the structured clone
algorithm of the HTML5 spec. Otherwise, that object instance will have its
ownership transferred.

Transfer-of-ownership is the generic term for the process currently applied to
MessagePort objects when passed in the 2nd parameter. The object is "closed" on
the sending side, and "activated" on the recieving side. Attempts to use the
object on the sending side (after sending) will "not work" (to be defined
per-object type).

It is also recommended that the HTML5 "structured clone algorithm" be updated
to include ArrayBuffer objects (or made extensible so that the TypedArray
specification and "plug-in" their ArrayBuffer objects into the algorithm).

-- 
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 Monday, 13 June 2011 18:14:47 UTC