[webkit-dev] The Care and Feeding of WebCore Modules

Darin Fisher darin at chromium.org
Tue Feb 28 11:25:41 PST 2012


On Tue, Feb 28, 2012 at 11:11 AM, Alexey Proskuryakov <ap at webkit.org> wrote:

>
> Having read the wiki page, I'm even more unhappy with the approach that
> has been taken than I used to be. In fact, it is harmful even to the goals
> of the refactoring.
>
> If a single #ifdefed line in DOMWindow.idl is a burden for development,
> what about adding several new files to each and every build system, and
> maintaining these multiple files into perpetuity? That's much more work for
> everyone - port maintainers, core developers, and feature developers. The
> likelihood of repeated breakage is higher with the need to maintain a more
> complicated build system.
>
> Sticking to the concrete example, these lines in WorkerContext.idl are not
> really something a WebSocket engineer maintains. It's more important for a
> person working on JS bindings and/or on threading, and the need to hunt
> down these across many files makes hacking more difficult. How can one even
> find an answer to the very practical question of which properties are
> available on WorkerContext if these are split across multiple files?
>

Is this something the build system could help address?  Perhaps a
by-product of the build is or could be a single file that contains
everything that will be exposed on WorkerContext / DOMWindow?

I know studying a generated file is never as nice as studying a source
file, but perhaps there is a compromise of this sort that could work?

I guess I'm just a big fan of modularization.  It seems helpful to separate
logical units and minimize large "cross roads" files.

-Darin




>
> #if defined(ENABLE_WEB_SOCKETS) && ENABLE_WEB_SOCKETS
>        attribute [JSCustomGetter,V8EnabledAtRuntime] WebSocketConstructor
> WebSocket; // Usable with the new operator
> #endif
>
> The goal is to make hacking easier. Moving files to separate directories
> should be done as long as that helps to advance the goal, but not beyond
> that, even if we now have an entertaining tool in the form of supplemental
> interfaces that lets you go far beyond reasonable.
>
> - WBR, Alexey Proskuryakov
>
>
> 28.02.2012, в 0:29, Adam Barth написал(а):
>
> > I wrote up a short wiki page explaining how the modules system works
> > and how to use it when building new features:
> >
> > https://trac.webkit.org/wiki/Modules
> >
> > We've been making good progress refactoring some existing features to
> > use the system.  This refactoring both improves the hackability of
> > WebCore by simplifying the core objects (e.g.,
> > Page/DOMWindow/Document/Navigator) and paves the cowpaths for new code
> > to avoid bloating these objects.
> >
> > In Bug 79663, Alexey asked why we were moving the WebSocket
> > declaration out of WorkerContext.idl and into Modules/websockets.
> > Viewed in isolation, I can understand why that change looks somewhat
> > mysterious.  Hopefully the wiki page above provides some more context
> > for the change.  In particular, WebSockets fits neatly into the
> > modules pattern.  We've already removed almost all mentions of
> > WebSockets from WebCore proper.  Besides one item in
> > WebCore::Settings, WorkerContext.idl is the last file in WebCore
> > proper to mention WebSockets.
> >
> > Adam
>
>
> _______________________________________________
> 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/20120228/9f893205/attachment.html>


More information about the webkit-dev mailing list