Bug 119404 - Give the error object's stack property accessor attributes.
Summary: Give the error object's stack property accessor attributes.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Curtis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-01 11:25 PDT by Chris Curtis
Modified: 2013-08-02 17:03 PDT (History)
1 user (show)

See Also:


Attachments
patch 1 (5.99 KB, patch)
2013-08-01 11:50 PDT, Chris Curtis
msaboff: review+
Details | Formatted Diff | Diff
patch 2 (6.01 KB, patch)
2013-08-01 16:29 PDT, Chris Curtis
no flags Details | Formatted Diff | Diff
Patch (5.82 KB, patch)
2013-08-02 14:43 PDT, Chris Curtis
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Curtis 2013-08-01 11:25:11 PDT
Treat the stack property like an accessor to match the functionality of Chrome error objects.
Comment 1 Chris Curtis 2013-08-01 11:50:58 PDT
Created attachment 207943 [details]
patch 1
Comment 2 Chris Curtis 2013-08-01 11:56:47 PDT
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 3 Michael Saboff 2013-08-01 15:10:48 PDT
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 4 Geoffrey Garen 2013-08-01 15:33:37 PDT
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.
Comment 5 Chris Curtis 2013-08-01 16:29:39 PDT
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 6 Geoffrey Garen 2013-08-02 14:06:04 PDT
Comment on attachment 207968 [details]
patch 2

r=me
Comment 7 WebKit Commit Bot 2013-08-02 14:31:55 PDT
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
Comment 8 Chris Curtis 2013-08-02 14:43:17 PDT
Created attachment 208047 [details]
Patch
Comment 9 Geoffrey Garen 2013-08-02 14:55:07 PDT
Comment on attachment 208047 [details]
Patch

r=me
Comment 10 WebKit Commit Bot 2013-08-02 17:03:28 PDT
Comment on attachment 208047 [details]
Patch

Clearing flags on attachment: 208047

Committed r153679: <http://trac.webkit.org/changeset/153679>
Comment 11 WebKit Commit Bot 2013-08-02 17:03:31 PDT
All reviewed patches have been landed.  Closing bug.