[webkit-reviews] review granted: [Bug 239289] Drop inefficient String::append() overloads : [Attachment 457553] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 13 14:53:38 PDT 2022


Sam Weinig <sam at webkit.org> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 239289: Drop inefficient String::append() overloads
https://bugs.webkit.org/show_bug.cgi?id=239289

Attachment 457553: Patch

https://bugs.webkit.org/attachment.cgi?id=457553&action=review




--- Comment #4 from Sam Weinig <sam at webkit.org> ---
Comment on attachment 457553
  --> https://bugs.webkit.org/attachment.cgi?id=457553
Patch

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

> Source/WebCore/Modules/indexeddb/IDBKeyData.cpp:375
> +	   result = makeString(StringView(result).left(147), "..."_s);

This hurts me but its just a logging string so I will not be overly upset.

> Source/WebCore/Modules/indexeddb/shared/IDBIndexInfo.cpp:65
> +    return makeString(indentString.toString(), "Index: ", m_name, " (",
m_identifier, ") keyPath: ", WebCore::loggingString(m_keyPath), '\n');

This should probably be:

indentString.append("Index: ", m_name, " (", m_identifier, ") keyPath: ",
WebCore::loggingString(m_keyPath), '\n');
return indentString.toString();

or just

makeString(WTF::Indentation<1> { indent }, "Index: ", m_name, " (",
m_identifier, ") keyPath: ", WebCore::loggingString(m_keyPath), '\n');

> Source/WebCore/inspector/agents/InspectorDOMAgent.cpp:1776
> +	       nodeValue = makeString(StringView(nodeValue).left(maxTextSize),
ellipsisUChar);

We should probably be using ellipsisUChar everywhere we use "..." if we want to
be good macOS citizens (don't ned to make that change now though).


More information about the webkit-reviews mailing list