[webkit-reviews] review granted: [Bug 98801] After r130344, OpaqueJSString::string() shouldn't directly return the wrapped String : [Attachment 167819] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 9 17:53:28 PDT 2012


Geoffrey Garen <ggaren at apple.com> has granted Michael Saboff
<msaboff at apple.com>'s request for review:
Bug 98801: After r130344, OpaqueJSString::string() shouldn't directly return
the wrapped String
https://bugs.webkit.org/show_bug.cgi?id=98801

Attachment 167819: Patch
https://bugs.webkit.org/attachment.cgi?id=167819&action=review

------- Additional Comments from Geoffrey Garen <ggaren at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=167819&action=review


r=me

> Source/JavaScriptCore/API/OpaqueJSString.cpp:50
> +    // Return a copy of the wrapped string, because the caller may make it
an Identifier.
> +    if (m_string.is8Bit())
> +	   return String(m_string.characters8(), m_string.length());
> +    return String(m_string.characters16(), m_string.length());

This could be String::isolatedCopy() instead.


More information about the webkit-reviews mailing list