Created attachment 74451 [details] Patch Reviewed by NOBODY (OOPS!). * JavaScriptCore.exp: * wtf/text/StringImpl.cpp: (WTF::StringImpl::secure): Added argument that controls whether the last character is obscured or not. Implemented behavior. * wtf/text/StringImpl.h: (WTF::StringImpl::LastCharacterBehavior): Added enum. (WTF::StringImpl::secure): Updated method signature. --- 4 files changed, 26 insertions(+), 5 deletions(-)
Comment on attachment 74451 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=74451&action=review > JavaScriptCore/wtf/text/StringImpl.cpp:277 > + if (m_length) { I think it would be better to say: if (!m_length) return this; At the start of the function, even before the createUninitialized call. > JavaScriptCore/wtf/text/StringImpl.cpp:278 > + const unsigned lastCharacterIndex = m_length - 1; We normally don’t use const for local variables like this one.
Comment on attachment 74451 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=74451&action=review > JavaScriptCore/wtf/text/StringImpl.h:290 > + PassRefPtr<StringImpl> secure(UChar, LastCharacterBehavior behavior = HideLastCharacter); We could omit the argument name “behavior” here.
Committed r72477: <http://trac.webkit.org/changeset/72477>