[webkit-dev] Making more use of ScriptWrappable

Elliott Sprehn esprehn at chromium.org
Thu Nov 1 11:21:17 PDT 2012


On Thu, Nov 1, 2012 at 2:09 PM, Kentaro Hara <haraken at google.com> wrote:
> ...
>
> Thanks to the recent efforts of Adam Barth, V8 bindings are going to
> remove the need to enumerate all wrappers, and thus the HashMap does
> not need to store all wrappers. On the other hand, what about JSC
> bindings?
>

JSC has a map per world, and the main world wrappers are stored in the
ScriptWrappable, not in the map. Only Node's are ScriptWrappable it
seems.

http://code.google.com/searchframe#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/bindings/js/JSDOMBinding.h&l=137

http://code.google.com/searchframe#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/bindings/js/JSNodeCustom.h&l=42

I'm not sure why setInlineCachedWrapper takes a Node* specifically, it
should just take a ScriptWrappable* so Adam's change works for JSC
too.

- E


More information about the webkit-dev mailing list