Title: [108649] trunk/Source/_javascript_Core
Revision
108649
Author
[email protected]
Date
2012-02-23 11:29:14 -0800 (Thu, 23 Feb 2012)

Log Message

JSString::outOfMemory() should ASSERT(isRope()) rather than !isRope()
https://bugs.webkit.org/show_bug.cgi?id=79268

Patch by Yong Li <[email protected]> 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):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (108648 => 108649)


--- trunk/Source/_javascript_Core/ChangeLog	2012-02-23 19:23:47 UTC (rev 108648)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-02-23 19:29:14 UTC (rev 108649)
@@ -1,3 +1,17 @@
+2012-02-23  Yong Li  <[email protected]>
+
+        JSString::outOfMemory() should ASSERT(isRope()) rather than !isRope()
+        https://bugs.webkit.org/show_bug.cgi?id=79268
+
+        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):
+
 2012-02-23  Patrick Gansterer  <[email protected]>
 
         [CMake] Add WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS macro

Modified: trunk/Source/_javascript_Core/runtime/JSString.cpp (108648 => 108649)


--- trunk/Source/_javascript_Core/runtime/JSString.cpp	2012-02-23 19:23:47 UTC (rev 108648)
+++ trunk/Source/_javascript_Core/runtime/JSString.cpp	2012-02-23 19:29:14 UTC (rev 108649)
@@ -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);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to