[Webkit-unassigned] [Bug 65209] Make MessagePort Transferable.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 1 16:27:40 PDT 2011


--- Comment #8 from Luke Zarko <lukezarko+bugzilla at gmail.com>  2011-08-01 16:27:40 PST ---
> In terms of webkit code when you modify the serialization data you need to bump the serialization version.

Noted-- but the only time that this change should affect serialization is when a transfer list is passed in. Is there any point where SerializedScriptValues read from disk would be paired with transfer lists?

>JSValueRefArray seems like a bad idea, you'd be much better off simply using Vector<JSValue, ...  rather than JSValueRef.  JSValueRef is really intended only for API usage.

Thanks; I'm quite new to JSC and was sure I made at least one of these kinds of mistakes.

> I'm also concerned that it is not clear how this is expected to work for cross-process messages.

When the message is being serialized for IPC, objects without special transfer semantics (like MessagePorts, which need to link up IPC channels-- compare these with ArrayBuffers, which are just hunks of data) must be flattened. The transfer of control still happens because the end-user shouldn't know that IPC actually happened; it's just this last step that changes. For Chromium IPC there's a (stub, for now) method (SerializedScriptValue::flattenReceiptList) that deals with this case.

> This error message change is concerning it implies that the new API behavior conflicts with existing behavior

As others have stated, the new behavior subsumes the old behavior. (One kind of weird side effect of this is that the .ports property of a MessageEvent needs to filter out only the MessagePort objects that were given to postMessage).

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list