Bug 100033 - [V8] Enumerate Nodes via the V8 heap rather than via a list in WebCore
Summary: [V8] Enumerate Nodes via the V8 heap rather than via a list in WebCore
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on:
Blocks: 97974
  Show dependency treegraph
 
Reported: 2012-10-22 14:39 PDT by Adam Barth
Modified: 2012-10-23 10:34 PDT (History)
5 users (show)

See Also:


Attachments
Patch (14.80 KB, patch)
2012-10-22 14:40 PDT, Adam Barth
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2012-10-22 14:39:12 PDT
[V8] Enumerate Nodes via the V8 heap rather than via a list in WebCore
Comment 1 Adam Barth 2012-10-22 14:40:32 PDT
Created attachment 169989 [details]
Patch
Comment 2 Eric Seidel (no email) 2012-10-22 14:45:14 PDT
Comment on attachment 169989 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=169989&action=review

LGTM.  You may wish to have Kentaro look too, as he's undoubtably more versed in this than I.

> Source/WebCore/bindings/v8/V8DOMMap.cpp:119
> +            v8::Persistent<v8::Object> wrapper = v8::Persistent<v8::Object>::Cast(value);

I assume this ASSERTs, etc. that this is an Object?
Comment 3 Adam Barth 2012-10-22 14:54:08 PDT
Performance results in https://bugs.webkit.org/show_bug.cgi?id=97974#c24
Comment 4 Adam Barth 2012-10-22 15:14:56 PDT
Comment on attachment 169989 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=169989&action=review

>> Source/WebCore/bindings/v8/V8DOMMap.cpp:119
>> +            ASSERT(V8Node::HasInstance(value));
>> +            ASSERT(value->IsObject());
>> +            ASSERT(!value.IsIndependent());
>> +            v8::Persistent<v8::Object> wrapper = v8::Persistent<v8::Object>::Cast(value);
> 
> I assume this ASSERTs, etc. that this is an Object?

It doesn't, but that's why I have the ASSERT on line 117.  :)
Comment 5 Kentaro Hara 2012-10-23 00:08:20 PDT
Comment on attachment 169989 [details]
Patch

LGTM.
Comment 6 WebKit Review Bot 2012-10-23 10:34:50 PDT
Comment on attachment 169989 [details]
Patch

Clearing flags on attachment: 169989

Committed r132242: <http://trac.webkit.org/changeset/132242>
Comment 7 WebKit Review Bot 2012-10-23 10:34:54 PDT
All reviewed patches have been landed.  Closing bug.