-
Notifications
You must be signed in to change notification settings - Fork 3
Allow implementation-defined choice of property or accessor #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 4 commits
509e889
f349e12
a83ae63
950072c
2ec1e89
8deb622
afc3b83
aab3b05
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -15,6 +15,35 @@ markEffects: true | |||||||||||||||
<p></p> | ||||||||||||||||
</emu-intro> | ||||||||||||||||
|
||||||||||||||||
<emu-clause id="sec-agents"> | ||||||||||||||||
<h1>Agents</h1> | ||||||||||||||||
|
||||||||||||||||
<emu-table id="table-agent-record" caption="Agent Record Fields"> | ||||||||||||||||
<table> | ||||||||||||||||
<thead> | ||||||||||||||||
<tr> | ||||||||||||||||
<th>Field Name</th> | ||||||||||||||||
<th>Value</th> | ||||||||||||||||
<th>Meaning</th> | ||||||||||||||||
</tr> | ||||||||||||||||
</thead> | ||||||||||||||||
<tr> | ||||||||||||||||
<td>[[UseErrorCaptureStackTraceDataProperty]]</td> | ||||||||||||||||
<td>a Boolean</td> | ||||||||||||||||
<td>Whether to use a data property or an accessor property for the "stack" property installed by Error.captureStackTrace.</td> | ||||||||||||||||
</tr> | ||||||||||||||||
</table> | ||||||||||||||||
</emu-table> | ||||||||||||||||
|
||||||||||||||||
<p>Once the values of [[Signifier]], [[IsLockFree1]], [[IsLockFree2]], and [[UseErrorCaptureStackTraceDataProperty]] have been observed by any agent in the agent cluster they cannot change.</p> | ||||||||||||||||
|
<p>Once the values of [[Signifier]], [[IsLockFree1]], [[IsLockFree2]], and [[UseErrorCaptureStackTraceDataProperty]] have been observed by any agent in the agent cluster they cannot change.</p> | |
<p>Once the values of [[Signifier]], [[IsLockFree1]], [[IsLockFree2]], and [[ErrorCaptureStackTraceStrategy]] have been observed by any agent in the agent cluster they cannot change.</p> |
Need to update this field name here and below.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To bring the two cases closer together it would be nice if both cases go through the same definition primitive. E.g., we could have an implementation specific PropertyDescriptor ([[Get]] vs. [[Value]]) which is then installed in the same way (e.g., OrdinaryDefineOwnProperty) in both cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer all of the things that share the behaviour described in SetterThatIgnoresPrototypeProperties
go through that AO. It's a very specific exception to how we usually do things in the language and it should both have fully consistent normative requirements and be discoverable. Reusing that AO helps with both goals.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting nit:
1. If ? IsExtensible( _error_ ) is *false*, throw a *TypeError* exception. | |
1. If ? IsExtensible(_error_) is *false*, throw a *TypeError* exception. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Let getterClosure be a new Abstract Closure with no parameters that captures _string_ and performs the following steps when called: | |
1. Let _getterClosure_ be a new Abstract Closure with no parameters that captures _string_ and performs the following steps when called: |
Similarly for all the bindings below.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Perform ! SetterThatIgnoresPrototypeProperties(_error_, OrdinaryObjectCreate(*null*), *"stack"*, _value_). | |
1. Perform ? SetterThatIgnoresPrototypeProperties(_error_, OrdinaryObjectCreate(*null*), *"stack"*, _value_). |
This AO can fail if the setter is called after the "stack"
property is deleted, for example.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Perform ! SetterThatIgnoresPrototypeProperties(_error_, OrdinaryObjectCreate(*null*), *"stack"*, _value_). | |
1. Perform ! SetterThatIgnoresPrototypeProperties(_error_, *null*, *"stack"*, _value_). |
This is just used for a SameValue
test against _error_
, so you just need to pass anything else.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You still need to return something here.
1. Perform ! SetterThatIgnoresPrototypeProperties(_error_, OrdinaryObjectCreate(*null*), *"stack"*, _value_). | |
1. Perform ! SetterThatIgnoresPrototypeProperties(_error_, OrdinaryObjectCreate(*null*), *"stack"*, _value_). | |
2. Return NormalCompletion(*undefined*). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: since this isn't a yes/no, it's an either/or, we would typically use a 2-state enum for this. Something like
[[ErrorCaptureStackTraceStrategy]]
with type "~data-property~
or~accessor~
".