WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
122368
Use more references instead of pointers in DocumentOrderedMap
https://bugs.webkit.org/show_bug.cgi?id=122368
Summary
Use more references instead of pointers in DocumentOrderedMap
Ryosuke Niwa
Reported
2013-10-04 19:05:59 PDT
Use more references instead of pointers in DocumentOrderedMap
Attachments
Cleanup
(51.46 KB, patch)
2013-10-04 19:07 PDT
,
Ryosuke Niwa
kling
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2013-10-04 19:07:00 PDT
Created
attachment 213431
[details]
Cleanup
Andreas Kling
Comment 2
2013-10-04 19:21:43 PDT
Comment on
attachment 213431
[details]
Cleanup View in context:
https://bugs.webkit.org/attachment.cgi?id=213431&action=review
Super neato! r=me
> Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp:76 > + Node* node = document->documentNamedItem(*atomicPropertyName);
This should be an Element*. That'll remove a branch from hasTagName() below.
> Source/WebCore/dom/DocumentOrderedMap.cpp:109 > + Map::iterator it = m_map.find(&key);
I'd use auto for this.
> Source/WebCore/dom/DocumentOrderedMap.cpp:130 > + Map::iterator it = m_map.find(&key);
Ditto.
> Source/WebCore/dom/DocumentOrderedMap.cpp:194 > + Map::iterator it = m_map.find(&key);
Ditto.
> Source/WebCore/dom/DocumentOrderedMap.h:96 > + Map::const_iterator it = m_map.find(&id);
Ditto.
> Source/WebCore/dom/DocumentOrderedMap.h:107 > + Map::const_iterator it = m_map.find(&id);
Ditto.
Ryosuke Niwa
Comment 3
2013-10-04 19:22:24 PDT
Comment on
attachment 213431
[details]
Cleanup View in context:
https://bugs.webkit.org/attachment.cgi?id=213431&action=review
> Source/WebCore/dom/IdTargetObserverRegistry.h:67 > ASSERT(!m_notifyingObserversInSet);
Oops, I need to assert that id is not empty here.
> Source/WebCore/dom/TreeScope.cpp:244 > + return m_imageMapsByName->getElementByLowercasedMapName(*AtomicString(name.lower()).impl(), *this); > + return m_imageMapsByName->getElementByMapName(*AtomicString(name).impl(), *this);
We should store AtomicString in a local variable here.
Ryosuke Niwa
Comment 4
2013-10-04 19:58:22 PDT
Committed
r156940
: <
http://trac.webkit.org/changeset/156940
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug