W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2011

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

From: <bugzilla@jessica.w3.org>
Date: Mon, 13 Jun 2011 18:14:45 +0000
To: public-webapps@w3.org
Message-ID: <bug-12947-2927@http.www.w3.org/Bugs/Public/>

           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:

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:20 UTC