Commit 15ab3356 authored by barraclough@apple.com's avatar barraclough@apple.com

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):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2e515b75
2012-07-02 Gavin Barraclough <barraclough@apple.com>
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 <fpizlo@apple.com>
JSObject wastes too much memory on unused property slots
......
......@@ -1258,7 +1258,10 @@ JSValue JSArray::pop(ExecState* exec)
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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment