Title: [136246] trunk/Source/_javascript_Core
- Revision
- 136246
- Author
- [email protected]
- Date
- 2012-11-30 08:59:03 -0800 (Fri, 30 Nov 2012)
Log Message
Crash in conversion of empty OpaqueJSString to Identifier
https://bugs.webkit.org/show_bug.cgi?id=101867
Reviewed by Michael Saboff.
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):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/API/OpaqueJSString.cpp (136245 => 136246)
--- trunk/Source/_javascript_Core/API/OpaqueJSString.cpp 2012-11-30 16:24:27 UTC (rev 136245)
+++ trunk/Source/_javascript_Core/API/OpaqueJSString.cpp 2012-11-30 16:59:03 UTC (rev 136246)
@@ -50,9 +50,12 @@
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());
Modified: trunk/Source/_javascript_Core/ChangeLog (136245 => 136246)
--- trunk/Source/_javascript_Core/ChangeLog 2012-11-30 16:24:27 UTC (rev 136245)
+++ trunk/Source/_javascript_Core/ChangeLog 2012-11-30 16:59:03 UTC (rev 136246)
@@ -1,3 +1,17 @@
+2012-11-30 Allan Sandfeld Jensen <[email protected]>
+
+ Crash in conversion of empty OpaqueJSString to Identifier
+ https://bugs.webkit.org/show_bug.cgi?id=101867
+
+ Reviewed by Michael Saboff.
+
+ 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ø <[email protected]>
[Qt] Place the LLIntOffsetsExtractor binaries in debug/release subdirs on Mac
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes