JSString::outOfMemory() should ASSERT(isRope()) rather than !isRope()
https://bugs.webkit.org/show_bug.cgi?id=79268
Patch by Yong Li <yoli@rim.com> on 2012-02-23
Reviewed by Michael Saboff.
resolveRope() is the only caller of outOfMemory(), and it calls outOfMemory()
after it fails to allocate a buffer for m_value. So outOfMemory() should assert
isRope() rather than !isRope().
* runtime/JSString.cpp:
(JSC::JSString::outOfMemory):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/runtime/JSString.cpp b/Source/JavaScriptCore/runtime/JSString.cpp
index 3fa2901..cfa7d03 100644
--- a/Source/JavaScriptCore/runtime/JSString.cpp
+++ b/Source/JavaScriptCore/runtime/JSString.cpp
@@ -189,7 +189,7 @@
{
for (size_t i = 0; i < s_maxInternalRopeLength && m_fibers[i]; ++i)
m_fibers[i].clear();
- ASSERT(!isRope());
+ ASSERT(isRope());
ASSERT(m_value == UString());
if (exec)
throwOutOfMemoryError(exec);