Commit bfb7db86 authored by andersca@apple.com's avatar andersca@apple.com

String::is8Bit() crashes if m_impl is null, handle this.

* API/OpaqueJSString.h:
(OpaqueJSString::OpaqueJSString):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162209 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2255344a
......@@ -77,7 +77,7 @@ private:
OpaqueJSString(const String& string)
: m_string(string.isolatedCopy())
, m_characters(m_string.is8Bit() ? nullptr : const_cast<UChar*>(m_string.characters16()))
, m_characters(m_string.impl() && m_string.is8Bit() ? nullptr : const_cast<UChar*>(m_string.characters16()))
{
}
......@@ -89,7 +89,7 @@ private:
OpaqueJSString(const UChar* characters, unsigned length)
: m_string(characters, length)
, m_characters(m_string.is8Bit() ? nullptr : const_cast<UChar*>(m_string.characters16()))
, m_characters(m_string.impl() && m_string.is8Bit() ? nullptr : const_cast<UChar*>(m_string.characters16()))
{
}
......
2014-01-17 Anders Carlsson <andersca@apple.com>
String::is8Bit() crashes if m_impl is null, handle this.
* API/OpaqueJSString.h:
(OpaqueJSString::OpaqueJSString):
2014-01-17 Anders Carlsson <andersca@apple.com>
Try to fix the Windows build.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment