[webkit-dev] [V8] It's time for V8Proxy to come to Jesus

Adam Barth abarth at webkit.org
Sat Jul 4 20:20:23 PDT 2009

On Sat, Jul 4, 2009 at 10:21 AM, Dimitri Glazkov<dglazkov at chromium.org> wrote:
> 1) For now, we've been concentrating on moving the remaining bits of
> the V8 bindings and project files upstream. Your proposed refactoring
> will more than likely involve modifying .gyp files. Perhaps it would
> be better to wait just a bit more until I upstream .gypis to avoid the
> super-painful two-sided patches?

Is there an ETA for upstreaming the gypi file?  That would be the main
helpful thing.

> 2) There is at least two folks who are actively working on improving
> performance and eliminate inconsistencies in V8 bindings. cc'ing to
> loop them in. Mads, Anton, you should be on webkit-dev, if you aren't
> already :)

My plan was to do a purely syntactic pass first, followed by a cleanup
that might change the semantics.  The main semantic things that I'm
hoping to clean up are retrieving the context / frame / proxy object
(because this is important for security and correctness) and the DOM
object <-> wrapper correspondence (because this is currently a bit of
a mess in the proxy).  If you all have other things I should keep in
mind, please let me know.

> 3) One of the big tasks on my horizon is refactoring V8 bindings to
> align them closer with JSC bindings, especially in the areas of event
> listeners and meaning of IDL attributes in the code generator. I would
> also love to implement an equivalent of the generated toJS(..). So
> please think about this when you're hacking on the proxy.

Yeah, the toJS approach is much cleaner than the V8Proxy way of doing
the same task.  I'm pretty familiar with the JSC bindings, so I'll try
to steer the changes to better match JSC when possible.

> 4) In the same spirit of aligning with JSC bindings, it would be great
> if your refactoring dissolved V8Proxy into new files/classes that are
> similar in convention/spirit to those on JSC side. The goal here is to
> make it easier to adjust V8 bindings after JSC bindings change.

My eventual plan was to circle back and make some of the same changes
to the JSC bindings (e.g., factor some kind of SecurityManager class
out of DOMWindowBase).  I floated some ideas for more closely aligning
the bindings earlier on this list.  There's a lot we can improve here.

> Thanks for taking on this! I am going to try and visit SFO next week,
> so perhaps we could meet up and do some strategery about this
> refactoring.

I should be able to come into the SF office for a day or two this
week.  That might be an efficient way to work on this.  If someone
interested in the JSC bindings (Sam, Maciej?) would like to come by,
we could have lunch and chat.  If you bring your laptop, we could have
a bindings hacking session.

I've filed a few bugs sketching out some proposed changes:


So far, these seem like obvious wins.  I'm sure things will get more
complex when I get into getTemplate, convertToV8Object, and friends.


More information about the webkit-dev mailing list