On Tue, Jul 7, 2009 at 5:25 PM, Adam Barth <[email protected]> wrote:
>
> I'd have to look at the code a bit more to know whether this is
> correct. Where does |globalObject| come from?
It comes from the JSDOMWindow object where that constructor is exposed. Case
in point:
#if ENABLE(CHANNEL_MESSAGING)
JSValue JSDOMWindow::messageChannel(ExecState* exec) const
{
return getDOMConstructor<JSMessageChannelConstructor>(exec, *this*);
}
#endif
So, when you first access someWindow.MessageChannel it should create a
JSMessageChannelConstructor whose prototype property is derived from
someWindow, then cache it in someWindow.
I'll run some tests as you suggest.
>
> For an added bonus, you should test what happens if you transplant the
> constructor from one window to another. The constructor should keep
> its original prototype chain.
>
> Adam
>
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev