Give the error object's stack property accessor attributes.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 3 Aug 2013 00:04:41 +0000 (00:04 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 3 Aug 2013 00:04:41 +0000 (00:04 +0000)
commit949c09182d1835b3ef84a8ea4c347c243a13aa51
tree29edb71387f9076f35ebe69ff6e15e8ddbaf446e
parent68f95dcb875c0f73d4e2df20efdc4861c046ed4b
Give the error object's stack property accessor attributes.
https://bugs.webkit.org/show_bug.cgi?id=119404

Source/JavaScriptCore:

Patch by Chris Curtis <chris_curtis@apple.com> on 2013-08-02
Reviewed by Geoffrey Garen.

Changed the attributes of error object's stack property to allow developers to write
and delete the stack property. This will match the functionality of Chrome. Firefox
allows developers to write the error's stack, but not delete it.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::addStackTraceIfNecessary):
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::finishCreation):

LayoutTests:

Patch by Chris Curtis <chris_curtis@apple.com> on 2013-08-02
Reviewed by Geoffrey Garen.

* fast/dom/DOMException/stack-trace-expected.txt:

New tests to show that the error object's stack property is writable and deleteable.
* fast/js/error-object-write-and-detele-for-stack-property-expected.txt: Added.
* fast/js/error-object-write-and-detele-for-stack-property.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153679 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/dom/DOMException/stack-trace-expected.txt
LayoutTests/fast/js/error-object-write-and-detele-for-stack-property-expected.txt [new file with mode: 0644]
LayoutTests/fast/js/error-object-write-and-detele-for-stack-property.html [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/interpreter/Interpreter.cpp
Source/JavaScriptCore/runtime/ErrorInstance.cpp