Bug 33584

Summary: [V8] Slow named property lookup on DOMWindow because of missing fast case
Product: WebKit Reporter: Mads Ager <ager>
Component: WebCore JavaScriptAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dglazkov, eric, jamesr
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Add fast case checks to V8 named getter on DOMWindow objects. none

Description Mads Ager 2010-01-13 02:34:38 PST
In the V8 named getter on DOMWindow objects, we always search the DOM using namedItems(propertyName) on the document.  We should check that the document is an HTMLDocument and use fast checks to determine if elements with that name exists before searching the DOM for all occurrences.

See http://crbug.com/32040 for an example where this hits us.
Comment 1 Mads Ager 2010-01-13 02:42:53 PST
Created attachment 46442 [details]
Add fast case checks to V8 named getter on DOMWindow objects.
Comment 2 Dimitri Glazkov (Google) 2010-01-13 08:27:38 PST
Comment on attachment 46442 [details]
Add fast case checks to V8 named getter on DOMWindow objects.

looks great!
Comment 3 WebKit Commit Bot 2010-01-13 23:35:08 PST
Comment on attachment 46442 [details]
Add fast case checks to V8 named getter on DOMWindow objects.

Clearing flags on attachment: 46442

Committed r53241: <http://trac.webkit.org/changeset/53241>
Comment 4 WebKit Commit Bot 2010-01-13 23:35:13 PST
All reviewed patches have been landed.  Closing bug.