Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 11 additions & 14 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -10386,17 +10386,11 @@ interface <dfn interface>DOMStringList</dfn> {
<span>IsDataDescriptor</span>(<var>valueMessageDesc</var>) is false, and
? <span>ToString</span>(<var>valueMessageDesc</var>.[[Value]]) otherwise.</p></li>

<li><p>Set <var>serialized</var> to { [[Type]]: "Error", [[Name]]: <var>name</var>,
[[Message]]: <var>message</var> }.</p></li>

<li>
<p>User agents should attach a serialized representation of any interesting accompanying
data which are not yet specified, notably the <code data-x="">stack</code> property, to
<var>serialized</var>.</p>
<li><p>Let <var>stack</var> be an <span>implementation-defined</span> string that represents the stack
trace of <var>value</var>. <ref>JSERRORSTACKACCESSOR</ref> <ref>JSERRORSTACKS</ref></p></li>
Comment on lines +10389 to +10390
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs rewrapping.


<p class="note">See the <cite>Error Stacks</cite> proposal for in-progress work on specifying
this data. <ref>JSERRORSTACKS</ref></p>
</li>
<li><p>Set <var>serialized</var> to { [[Type]]: "Error", [[Name]]: <var>name</var>,
[[Message]]: <var>message</var>, [[Stack]]: <var>stack</var> }.</p></li>
</ol>
</li>

Expand Down Expand Up @@ -10848,7 +10842,7 @@ o.myself = o;</code></pre>
<li><p>Let <var>message</var> be <var>serialized</var>.[[Message]].</p></li>

<li><p>Set <var>value</var> to <span>OrdinaryObjectCreate</span>(<var>prototype</var>, «
[[ErrorData]] »).</p></li>
[[ErrorData]], [[Stack]] »).</p></li>

<li><p>Let <var>messageDesc</var> be <span>PropertyDescriptor</span> { [[Value]]:
<var>message</var>, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true
Expand All @@ -10858,8 +10852,8 @@ o.myself = o;</code></pre>
<span>OrdinaryDefineOwnProperty</span>(<var>value</var>, "<code data-x="">message</code>",
<var>messageDesc</var>).</p></li>

<li><p>Any interesting accompanying data attached to <var>serialized</var> should be
deserialized and attached to <var>value</var>.</p></li>
<li><p>Set <var>value</var>.[[Stack]] to an implementation-defined value that represents
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xref implementation-defined. Although, can it literally be anything? We already serialized it to a string. Can it stay a string or do some implementations deserialize to an Array or Object? It would be nice if only one side had to be implementation-defined and we could at least agree on the value type.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The user-visible value is always a string, but implementations can store any data structure they like there, and they will want to if https://github.com/tc39/proposal-error-stacks advances.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But then let’s just serialize as an implementation-defined string and return that as-is here? Alternatively I suppose we could have implementation-defined on both sides but then we don’t have to require a string when serializing, but do need to require that here.

the stack trace serialized in <var>serialized</var>.[[Stack]].</p></li>
</ol>
</li>

Expand Down Expand Up @@ -156433,8 +156427,11 @@ INSERT INTERFACES HERE
<dt id="refsJPEG">[JPEG]</dt>
<dd><cite><a href="https://www.w3.org/Graphics/JPEG/jfif3.pdf">JPEG File Interchange Format</a></cite>, E. Hamilton.</dd>

<dt id="refsJSERRORSTACKACCESSOR">[JSERRORSTACKACCESSOR]</dt>
<dd><cite><a href="https://tc39.es/proposal-error-stack-accessor/">Error Stack Accessor</a></cite>. Ecma International.</dd>

<dt id="refsJSERRORSTACKS">[JSERRORSTACKS]</dt>
<dd>(Non-normative) <cite><a href="https://tc39.es/proposal-error-stacks/">Error Stacks</a></cite>. Ecma International.</dd>
<dd><cite><a href="https://tc39.es/proposal-error-stacks/">Error Stacks</a></cite>. Ecma International.</dd>

<dt id="refsJSDYNAMICCODEBRANDCHECKS">[JSDYNAMICCODEBRANDCHECKS]</dt>
<dd><cite><a href="https://tc39.es/proposal-dynamic-code-brand-checks/">Dynamic code brand checks</a></cite>. Ecma International.</dd>
Expand Down
Loading