summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore')
-rw-r--r--Source/JavaScriptCore/API/OpaqueJSString.cpp7
-rw-r--r--Source/JavaScriptCore/ChangeLog14
2 files changed, 19 insertions, 2 deletions
diff --git a/Source/JavaScriptCore/API/OpaqueJSString.cpp b/Source/JavaScriptCore/API/OpaqueJSString.cpp
index ac7cfd16a..90bc1c095 100644
--- a/Source/JavaScriptCore/API/OpaqueJSString.cpp
+++ b/Source/JavaScriptCore/API/OpaqueJSString.cpp
@@ -50,8 +50,11 @@ String OpaqueJSString::string() const
Identifier OpaqueJSString::identifier(JSGlobalData* globalData) const
{
- if (!this || !m_string.length())
- return Identifier(globalData, static_cast<const char*>(0));
+ if (!this || m_string.isNull())
+ return Identifier();
+
+ if (m_string.isEmpty())
+ return Identifier(Identifier::EmptyIdentifier);
if (m_string.is8Bit())
return Identifier(globalData, m_string.characters8(), m_string.length());
diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog
index 13066e436..7a50471b6 100644
--- a/Source/JavaScriptCore/ChangeLog
+++ b/Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,17 @@
+2012-11-30 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ Crash in conversion of empty OpaqueJSString to Identifier
+ https://bugs.webkit.org/show_bug.cgi?id=101867
+
+ Reviewed by NOBODY (OOPS!).
+
+ The constructor call used for both null and empty OpaqueJSStrings results
+ in an assertion voilation and crash. This patch instead uses the Identifier
+ constructors which are specifically for null and empty Identifier.
+
+ * API/OpaqueJSString.cpp:
+ (OpaqueJSString::identifier):
+
2012-11-30 Tor Arne Vestbø <tor.arne.vestbo@digia.com>
[Qt] Place the LLIntOffsetsExtractor binaries in debug/release subdirs on Mac