Title: [121700] trunk/Source/_javascript_Core
Revision
121700
Author
[email protected]
Date
2012-07-02 12:25:59 -0700 (Mon, 02 Jul 2012)

Log Message

Array.prototype.pop should throw if property is not configurable
https://bugs.webkit.org/show_bug.cgi?id=75788

Rubber Stamped by Oliver Hunt.

No real bug here any more, but the error we throw sometimes has a misleading message.
 
* runtime/JSArray.cpp:
(JSC::JSArray::pop):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (121699 => 121700)


--- trunk/Source/_javascript_Core/ChangeLog	2012-07-02 19:22:43 UTC (rev 121699)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-07-02 19:25:59 UTC (rev 121700)
@@ -1,3 +1,15 @@
+2012-07-02  Gavin Barraclough  <[email protected]>
+
+        Array.prototype.pop should throw if property is not configurable
+        https://bugs.webkit.org/show_bug.cgi?id=75788
+
+        Rubber Stamped by Oliver Hunt.
+
+        No real bug here any more, but the error we throw sometimes has a misleading message.
+ 
+        * runtime/JSArray.cpp:
+        (JSC::JSArray::pop):
+
 2012-06-29  Filip Pizlo  <[email protected]>
 
         JSObject wastes too much memory on unused property slots

Modified: trunk/Source/_javascript_Core/runtime/JSArray.cpp (121699 => 121700)


--- trunk/Source/_javascript_Core/runtime/JSArray.cpp	2012-07-02 19:22:43 UTC (rev 121699)
+++ trunk/Source/_javascript_Core/runtime/JSArray.cpp	2012-07-02 19:25:59 UTC (rev 121700)
@@ -1258,7 +1258,10 @@
     if (exec->hadException())
         return jsUndefined();
     // Call the [[Delete]] internal method of O with arguments indx and true.
-    deletePropertyByIndex(this, exec, index);
+    if (!deletePropertyByIndex(this, exec, index)) {
+        throwTypeError(exec, "Unable to delete property.");
+        return jsUndefined();
+    }
     // Call the [[Put]] internal method of O with arguments "length", indx, and true.
     setLength(exec, index, true);
     // Return element.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to