Bug 120277

Summary: JSHTMLFormElement::canGetItemsForName needlessly allocates a Vector
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: BindingsAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, kling, koivisto, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 120279, 120432    
Attachments:
Description Flags
Cleanup none

Ryosuke Niwa
Reported 2013-08-25 15:52:59 PDT
There's no reason for JSHTMLFormElement::canGetItemsForName to be allocating a Vector since it only needs to figure out if there is a named item or not: bool JSHTMLFormElement::canGetItemsForName(ExecState*, HTMLFormElement* form, PropertyName propertyName) { Vector<RefPtr<Node> > namedItems; form->getNamedElements(propertyNameToAtomicString(propertyName), namedItems); return namedItems.size(); }
Attachments
Cleanup (6.80 KB, patch)
2013-08-25 16:03 PDT, Ryosuke Niwa
no flags
Ryosuke Niwa
Comment 1 2013-08-25 16:03:31 PDT
WebKit Commit Bot
Comment 2 2013-08-25 23:03:58 PDT
Comment on attachment 209606 [details] Cleanup Clearing flags on attachment: 209606 Committed r154586: <http://trac.webkit.org/changeset/154586>
WebKit Commit Bot
Comment 3 2013-08-25 23:04:01 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.