RESOLVED FIXED 118941
Do not allocate 2 AtomicString just to do a comparison in HTMLAnchorElement::setRel()
https://bugs.webkit.org/show_bug.cgi?id=118941
Summary Do not allocate 2 AtomicString just to do a comparison in HTMLAnchorElement::...
Benjamin Poulain
Reported 2013-07-19 23:40:56 PDT
Do not allocate 2 AtomicString just to do a comparison in HTMLAnchorElement::setRel()
Attachments
Patch (7.79 KB, patch)
2013-07-19 23:44 PDT, Benjamin Poulain
barraclough: review+
Benjamin Poulain
Comment 1 2013-07-19 23:44:46 PDT
Gavin Barraclough
Comment 2 2013-07-21 16:15:22 PDT
Comment on attachment 207189 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=207189&action=review > Source/WebCore/dom/SpaceSplitString.h:91 > + return spaceSplitStringContainsValue(spaceSplitString, value, length - 1, shouldFoldCase); The -1 here wasn't obvious to me?
Benjamin Poulain
Comment 3 2013-07-21 18:57:57 PDT
(In reply to comment #2) > (From update of attachment 207189 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=207189&action=review > > > Source/WebCore/dom/SpaceSplitString.h:91 > > + return spaceSplitStringContainsValue(spaceSplitString, value, length - 1, shouldFoldCase); > > The -1 here wasn't obvious to me? It is because the length of the array for a string literal include the ending zero. "Foo" -> evaluates to 4.
Benjamin Poulain
Comment 4 2013-07-22 15:22:42 PDT
Note You need to log in before you can comment on or make changes to this bug.