Bug 35226 - Cache JavaScript wrappers inline in DOM nodes
Summary: Cache JavaScript wrappers inline in DOM nodes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-21 20:12 PST by Maciej Stachowiak
Modified: 2010-02-24 20:07 PST (History)
3 users (show)

See Also:


Attachments
Patch (15.13 KB, patch)
2010-02-21 20:29 PST, Maciej Stachowiak
no flags Details | Formatted Diff | Diff
Patch (23.24 KB, patch)
2010-02-24 19:21 PST, Maciej Stachowiak
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Stachowiak 2010-02-21 20:12:48 PST
Cache JavaScript wrappers inline in DOM nodes
Comment 1 Maciej Stachowiak 2010-02-21 20:29:31 PST
Created attachment 49181 [details]
Patch
Comment 2 Darin Adler 2010-02-21 20:34:53 PST
Comment on attachment 49181 [details]
Patch

>  void forgetDOMObject(DOMObject* wrapper, void* objectHandle)
>  {
> +    
>      JSC::JSGlobalData* globalData = Heap::heap(wrapper)->globalData();

No need for this added blank line.

> -    JSNode* getCachedDOMNodeWrapper(JSC::ExecState*, Document*, Node*);
> +    JSNode* getCachedDOMNodeWrapper(JSC::ExecState*, Node*);

This is defined in JSNodeCustom.h instead of this header. Why?

> +    inline DOMObjectWrapperMap& DOMObjectWrapperMapFor(JSC::ExecState* exec)
> +    {
> +        return currentWorld(exec)->m_wrappers;
> +    }

In the past we have lowercased even acronyms like DOM here at the start of a function name. Maybe there's some way to dodge the issue.

r=me
Comment 3 WebKit Review Bot 2010-02-21 20:46:04 PST
Attachment 49181 [details] did not build on qt:
Build output: http://webkit-commit-queue.appspot.com/results/297608
Comment 4 WebKit Review Bot 2010-02-21 20:49:07 PST
Attachment 49181 [details] did not build on gtk:
Build output: http://webkit-commit-queue.appspot.com/results/298397
Comment 5 Maciej Stachowiak 2010-02-22 01:28:47 PST
Committed r55074: <http://trac.webkit.org/changeset/55074>
Comment 6 Maciej Stachowiak 2010-02-22 02:33:58 PST
Reverted my change; it caused some breakage.
Comment 7 Maciej Stachowiak 2010-02-24 19:21:42 PST
Created attachment 49461 [details]
Patch
Comment 8 Oliver Hunt 2010-02-24 19:31:17 PST
Comment on attachment 49461 [details]
Patch

r=me
Comment 9 WebKit Review Bot 2010-02-24 19:50:41 PST
Attachment 49461 [details] did not build on qt:
Build output: http://webkit-commit-queue.appspot.com/results/309288
Comment 10 WebKit Review Bot 2010-02-24 19:57:26 PST
Attachment 49461 [details] did not build on gtk:
Build output: http://webkit-commit-queue.appspot.com/results/308324
Comment 11 Maciej Stachowiak 2010-02-24 20:07:56 PST
Committed r55215: <http://trac.webkit.org/changeset/55215>