Bug 65168 - Use AtomicString in Document::documentNamedItems and Document::windowNamedItems
Summary: Use AtomicString in Document::documentNamedItems and Document::windowNamedItems
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Patrick R. Gansterer
URL:
Keywords:
Depends on:
Blocks: 65172
  Show dependency treegraph
 
Reported: 2011-07-26 02:31 PDT by Patrick R. Gansterer
Modified: 2012-03-01 13:56 PST (History)
0 users

See Also:


Attachments
Patch (3.85 KB, patch)
2011-07-26 03:30 PDT, Patrick R. Gansterer
eric: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick R. Gansterer 2011-07-26 02:31:07 PDT
Use AtomicString in Document::documentNamedItems and Document::windowNamedItems
Comment 1 Patrick R. Gansterer 2011-07-26 03:30:57 PDT
Created attachment 101983 [details]
Patch
Comment 2 Ryosuke Niwa 2011-09-14 21:33:54 PDT
Comment on attachment 101983 [details]
Patch

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

looks sane to me.

> Source/WebCore/dom/Document.cpp:4152
>      return HTMLNameCollection::create(this, WindowNamedItems, name);

But HTMLNameCollection::create takes const String!
Comment 3 Brent Fulgham 2011-11-10 09:44:27 PST
Comment on attachment 101983 [details]
Patch

For this patch to be useful, doesn't HTMLNameCollection::m_name need to be an AtomicString as well?
Comment 4 Eric Seidel (no email) 2012-03-01 13:56:55 PST
Comment on attachment 101983 [details]
Patch

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

>> Source/WebCore/dom/Document.cpp:4152
>>      return HTMLNameCollection::create(this, WindowNamedItems, name);
> 
> But HTMLNameCollection::create takes const String!

That doesn't make the change completely invalid, but w/o some sort of microbenchmark to demonstrate that this is a win, this isn't worth doing w/o the AtomicStirng being kept around.