[whatwg] Worker lifecycle

On Thu, 28 May 2009, Maciej Stachowiak wrote:
> > 
> > I've tweaked the text some to make it clear that once the port is not 
> > entangled, it doesn't continue being protected in this way.
> 
> The new text seems to be this:
> 
> "When a MessagePort object is entangled, user agents must either act as 
> if the object has a strong reference to its entangledMessagePort object, 
> or as if the MessagePort object's owner has a strong reference to the 
> MessagePort object"
> 
> It seems to me this allows the following case: two message ports A and B 
> are entangled. A is treated as having a strong reference to B, but is 
> not treated as if its owner has a strong reference to it. However, B is 
> not treated as having a strong reference to A, but is treated as if its 
> owner has a strong reference to it. Is that intended? I think this 
> behavior would be practically implementable and quite useful in many 
> cases, even though it is asymmetric. But I am not sure if the text 
> intended to allow it.

Oops, I got this backwards.

Fixed.

I also added a note encouraging authors to use the close() method to save 
memory.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Thursday, 11 June 2009 20:18:49 UTC