[whatwg] onclose events for MessagePort

James Graham james at hoppipolla.co.uk
Thu Oct 10 10:18:55 PDT 2013


On 10/10/13 18:14, David Barrett-Kahn wrote:
> On GC being a source of cross-browser difficulty: I think you can fix that
> by stating in the messageport spec when we guarantee to implicitly close
> the connection (when its host page closes) and when we provide no
> guarantees (when it loses all its references).
>
> On people relying on GC timing: Those people are being silly and deserve
> what they get, as they do in Java.  Using destructors in that language is
> very nearly always a bad idea, but they still put them there and it was
> fine.

The problem is that it's not perceived as the fault of the page author, 
but as the fault of the browser in which the page fails to work (which 
may indeed be a browser in which it previously did work and that then 
happened to upgrade its GC implementation).

The difference between the web and Java is that with Java you can 
mandate a particular version of a particular implementation, even if it 
is considered ugly to do so. With the web that isn't possible.




More information about the whatwg mailing list