Treat the stack property like an accessor to match the functionality of Chrome error objects.
Created attachment 207943 [details] patch 1
Something to note: This does NOT affect the inspector's console because it reads from the vm->exceptionStack, not the error object's stack
Comment on attachment 207943 [details] patch 1 View in context: https://bugs.webkit.org/attachment.cgi?id=207943&action=review > Source/JavaScriptCore/ChangeLog:10 > + allows developers to write the error's stack, but not delete it. Extra "allows"
Comment on attachment 207943 [details] patch 1 View in context: https://bugs.webkit.org/attachment.cgi?id=207943&action=review > Source/JavaScriptCore/runtime/ErrorInstance.cpp:47 > + putDirect(vm, vm.propertyNames->stack, vm.interpreter->stackTraceAsString(vm.topCallFrame, stackTrace), Accessor); Why did you use the Accessor property attribute instead of None? Accessor claims to be for getters and setters: Accessor = 1 << 5, // property is a getter/setter That doesn't seem right here.
Created attachment 207968 [details] patch 2 Changed the stack attribute to have no attributes. I was thinking of that the stack was a data member of the error object, which is why I gave it the accessor attribute, but giving it no attributes makes more sense.
Comment on attachment 207968 [details] patch 2 r=me
Comment on attachment 207968 [details] patch 2 Rejecting attachment 207968 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-01', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 207968, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: /git.webkit.org/WebKit 9cf610c..0fa6172 master -> origin/master Partial-rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc ... Currently at 153668 = 9cf610c9829c6d5173bd4cfe91fdf7414b133d68 r153669 = 0fa61728f48289a47ddfd910520ab29f27274e30 Done rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc First, rewinding head to replay your work on top of it... Fast-forwarded master to refs/remotes/origin/master. Full output: http://webkit-queues.appspot.com/results/1326321
Created attachment 208047 [details] Patch
Comment on attachment 208047 [details] Patch r=me
Comment on attachment 208047 [details] Patch Clearing flags on attachment: 208047 Committed r153679: <http://trac.webkit.org/changeset/153679>
All reviewed patches have been landed. Closing bug.