[Webkit-unassigned] [Bug 102240] [V8] Rename dispatchWrap

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 27 06:05:35 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=102240





--- Comment #9 from Kentaro Hara <haraken at chromium.org>  2012-11-27 06:07:47 PST ---
Thank you very much for the clarification.

> > - If we want to write custom toV8(), we need to specify [(V8)CustomToJSObject] and [V8NoWrapperCache].
> 
> no, you just need V8NoWrapperCache, which means we don't care about caching, which in turn means we can't generate a toV8, so you must provide one.

Got it. I understood the situation, but I guess that the IDL attributes are confusing. In JSC, [(JS)CustomToJSObject] indicates that we can write custom toJS(). In V8, [(V8)CustomToJSObject] indicates that we can write custom wrap(). [V8NoWrapperCache] indicates that we can write custom toV8().

Maybe we want to change it like this?

- [(V8)CustomToJSObject] => we can write custom toV8()
- [V8CustomWrap] => we can write custom wrap()


Another confusion comes from the fact that [(V8)CustomToJSObject] is specified for all IDL files that have [V8NoWrapperCache]. The [(V8)CustomToJSObject] is useless (ignored in code generators). We can remove the [(V8)CustomToJSObject] from those IDL files.



> > [3] Just to clarify, would you elaborate on why the following structure won't work? (I'd like to understand what is making the situation complicated.)
> > 
> >   call path: toV8Fast() => toV8() => createWrapper()
> > 
> >   - toV8Fast() does the cache check.
> >   - toV8() can be custom to let developers write any delegation logic.
> >   - createWrapper() creates a new V8 object.
> 
> that's essentially what we have, except if you rename toV8Fast to toV8 and toV8 to wrap. 
> 
> the problem with what you seem to want is that toV8Fast is only suitable for some places, so toV8 also needs to exist and do a wrapper check, which means 2 wrapper checks for those places

Thanks, I understood the situation. (I'm thinking about how we can make it simpler. My colleague asked me to simplify it because the current situation is complicated:-) toV8Fast(), toV8(), toV8Object(), wrap(), createWrapper()...)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list