[Webkit-unassigned] [Bug 149556] Improve binding of JSBuiltinConstructor classes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 25 23:49:08 PDT 2015


--- Comment #2 from youenn fablet <youennf at gmail.com> ---
(In reply to comment #1)
> > It requires bypassing JSDOMGlobalObject wrapper cache, which is another
> > efficiency bonus.
> My proposal above does not require bypassing the wrapper cache. The
> singleton wrapper will simply be found in the cache (many times over).

I may be missing something here.
My understanding is that, if using a singleton, toJS(XX::create()) will always return the same JSXX object. This is not what we want, we want a new object each time. 
Hence why I think we should bypass the cache and remove the generation of the toJS(XX) function. Once done, the singleton class might be made private to the JS class or applicable to all classes.

> We may not need an object at all if we are changing things like the wrapper
> class. I think we should create a JavaScript object that doesn’t wrap a DOM
> object at all. And I’m not even sure it’s all that challenging to do that. I
> might take a crack at it.

I agree, that is the idea behind removing toJS, releaseImpl and so on...
I haven't done the exercise so cannot comment on how much complexity it will add to the binding generator.

You are probably right about the limited complexity it will need.
But the binding generator seems already a bit messy to me.

Do not hesitate to move that forward directly.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150926/17dac0b5/attachment-0001.html>

More information about the webkit-unassigned mailing list