[webkit-dev] Making more use of ScriptWrappable

Adam Barth abarth at webkit.org
Thu Nov 1 11:28:21 PDT 2012


On Thu, Nov 1, 2012 at 11:21 AM, Elliott Sprehn <esprehn at chromium.org> wrote:
> 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.

Yes, the last patch in that series landed a few minutes before I sent
this email.

>> 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.

Yes, this should be straightforward for the JSC bindings.

Adam


More information about the webkit-dev mailing list