[webkit-dev] GlobalScript in WebKit

Darin Fisher darin at chromium.org
Mon Nov 30 15:07:37 PST 2009


On Mon, Nov 30, 2009 at 2:56 PM, Oliver Hunt <oliver at apple.com> wrote:

> > In Chrome, a SharedWorker is reachable from any WebKit process, whereas a
> SharedScript would only be reachable within a WebKit process.  This is an
> interesting distinction, and I can imagine some use cases for SharedWorker
> that SharedScript could not address.  (This distinction arises because we
> did not want to build a script proxy between WebKit processes as that would
> be quite costly.)
> >
> > For example, suppose you wanted to have only one instance of a web app
> responsible for manipulating a database or communicating with a server.
>  There's no guarantee that multiple instances of a web app would all run in
> the same WebKit process.
>
> What you seem to be implying is that a "SharedScript" would not actually
> achieve the one thing it is intended to gain -- a common context for all
> instances of a page.
>

No.  I'm saying that SharedScript would be shared within a WebKit process,
similar to the "sharing" that happens for DOM windows (reachable by name).
 That doesn't prevent it from being shared by multiple pages in an
application.  For any Window created by a web app, Chrome keeps the new
window in the same process as the opener since they may script one another
(i.e., they may be effectively part of the same web app).

-Darin



>
> >
> > -Darin
> --Oliver
>
> > _______________________________________________
> > webkit-dev mailing list
> > webkit-dev at lists.webkit.org
> > http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20091130/7bc54833/attachment.html>


More information about the webkit-dev mailing list