Skip to content

Commit

Permalink
spec: remove proxy piercing
Browse files Browse the repository at this point in the history
Closes #8
  • Loading branch information
ljharb committed Jul 18, 2024
1 parent ebb8712 commit 445a893
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
10 changes: 5 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1556,7 +1556,7 @@
});
let sdoMap = JSON.parse(`{}`);
let biblio = JSON.parse(`{"refsByClause":{"sec-error.iserror":["_ref_0"],"sec-iserror":["_ref_1"]},"entries":[{"type":"clause","id":"sec-error.iserror","title":"Error.isError ( arg )","titleHTML":"Error.isError ( <var>arg</var> )","number":"20.5.2.1"},{"type":"clause","id":"sec-properties-of-the-error-constructor","titleHTML":"Properties of the Error Constructor","number":"20.5.2"},{"type":"op","aoid":"IsError","refId":"sec-iserror"},{"type":"clause","id":"sec-iserror","title":"IsError ( argument )","titleHTML":"IsError ( <var>argument</var> )","number":"20.5.8.2","referencingIds":["_ref_0","_ref_1"]},{"type":"clause","id":"sec-abstract-operations-for-error-objects","titleHTML":"Abstract Operations for Error Objects","number":"20.5.8"},{"type":"clause","id":"sec-error-objects","titleHTML":"Error Objects","number":"20.5"},{"type":"clause","id":"sec-fundamental-objects","titleHTML":"Fundamental Objects","number":"20"},{"type":"clause","id":"sec-copyright-and-software-license","title":"Copyright & Software License","titleHTML":"Copyright &amp; Software License","number":"A"}]}`);
let biblio = JSON.parse(`{"refsByClause":{"sec-error.iserror":["_ref_0"]},"entries":[{"type":"clause","id":"sec-error.iserror","title":"Error.isError ( arg )","titleHTML":"Error.isError ( <var>arg</var> )","number":"20.5.2.1"},{"type":"clause","id":"sec-properties-of-the-error-constructor","titleHTML":"Properties of the Error Constructor","number":"20.5.2"},{"type":"op","aoid":"IsError","refId":"sec-iserror"},{"type":"clause","id":"sec-iserror","title":"IsError ( argument )","titleHTML":"IsError ( <var>argument</var> )","number":"20.5.8.2","referencingIds":["_ref_0"]},{"type":"clause","id":"sec-abstract-operations-for-error-objects","titleHTML":"Abstract Operations for Error Objects","number":"20.5.8"},{"type":"clause","id":"sec-error-objects","titleHTML":"Error Objects","number":"20.5"},{"type":"clause","id":"sec-fundamental-objects","titleHTML":"Fundamental Objects","number":"20"},{"type":"clause","id":"sec-copyright-and-software-license","title":"Copyright & Software License","titleHTML":"Copyright &amp; Software License","number":"A"}]}`);
;let usesMultipage = false</script><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.0.1/styles/base16/solarized-light.min.css"><style>/* IBM Plex fonts (Latin subset) have been downloaded from Google Fonts and modified to add support back in for the `zero` substitution (slashed zeroes) */
/* https://fonts.googleapis.com/css2?family=IBM%20Plex%20Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap */
Expand Down Expand Up @@ -3218,7 +3218,7 @@
</ul></div><div id="menu-toggle"><svg xmlns="http://www.w3.org/2000/svg" style="width:100%; height:100%; stroke:currentColor" viewBox="0 0 120 120" width="54" height="54">
<title>Menu</title>
<path stroke-width="10" stroke-linecap="round" d="M30,60 h60 M30,30 m0,5 h60 M30,90 m0,-5 h60"></path>
</svg></div><div id="menu-spacer" class="menu-spacer"></div><div id="menu"><div id="menu-search"><input type="text" id="menu-search-box" placeholder="Search..."><div id="menu-search-results" class="inactive"></div></div><div id="menu-pins"><div class="menu-pane-header">Pins<button class="unpin-all">clear</button></div><ul id="menu-pins-list"></ul></div><div class="menu-pane-header">Table of Contents</div><div id="menu-toc"><ol class="toc"><li><span class="item-toggle">+</span><a href="#sec-fundamental-objects" title="Fundamental Objects"><span class="secnum">20</span> Fundamental Objects</a><ol class="toc"><li><span class="item-toggle">+</span><a href="#sec-error-objects" title="Error Objects"><span class="secnum">20.5</span> Error Objects</a><ol class="toc"><li><span class="item-toggle">+</span><a href="#sec-properties-of-the-error-constructor" title="Properties of the Error Constructor"><span class="secnum">20.5.2</span> Properties of the Error Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-error.iserror" title="Error.isError ( arg )"><span class="secnum">20.5.2.1</span> Error.isError ( <var>arg</var> )</a></li></ol></li><li><span class="item-toggle">+</span><a href="#sec-abstract-operations-for-error-objects" title="Abstract Operations for Error Objects"><span class="secnum">20.5.8</span> Abstract Operations for Error Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-iserror" title="IsError ( argument )"><span class="secnum">20.5.8.2</span> IsError ( <var>argument</var> )</a></li></ol></li></ol></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-copyright-and-software-license" title="Copyright &amp; Software License"><span class="secnum">A</span> Copyright &amp; Software License</a></li></ol></div></div><div id="spec-container"><h1 class="version">Stage 2 Draft / July 9, 2024</h1><h1 class="title">Error.isError</h1>
</svg></div><div id="menu-spacer" class="menu-spacer"></div><div id="menu"><div id="menu-search"><input type="text" id="menu-search-box" placeholder="Search..."><div id="menu-search-results" class="inactive"></div></div><div id="menu-pins"><div class="menu-pane-header">Pins<button class="unpin-all">clear</button></div><ul id="menu-pins-list"></ul></div><div class="menu-pane-header">Table of Contents</div><div id="menu-toc"><ol class="toc"><li><span class="item-toggle">+</span><a href="#sec-fundamental-objects" title="Fundamental Objects"><span class="secnum">20</span> Fundamental Objects</a><ol class="toc"><li><span class="item-toggle">+</span><a href="#sec-error-objects" title="Error Objects"><span class="secnum">20.5</span> Error Objects</a><ol class="toc"><li><span class="item-toggle">+</span><a href="#sec-properties-of-the-error-constructor" title="Properties of the Error Constructor"><span class="secnum">20.5.2</span> Properties of the Error Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-error.iserror" title="Error.isError ( arg )"><span class="secnum">20.5.2.1</span> Error.isError ( <var>arg</var> )</a></li></ol></li><li><span class="item-toggle">+</span><a href="#sec-abstract-operations-for-error-objects" title="Abstract Operations for Error Objects"><span class="secnum">20.5.8</span> Abstract Operations for Error Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-iserror" title="IsError ( argument )"><span class="secnum">20.5.8.2</span> IsError ( <var>argument</var> )</a></li></ol></li></ol></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-copyright-and-software-license" title="Copyright &amp; Software License"><span class="secnum">A</span> Copyright &amp; Software License</a></li></ol></div></div><div id="spec-container"><h1 class="version">Stage 2 Draft / July 18, 2024</h1><h1 class="title">Error.isError</h1>
<emu-clause id="sec-fundamental-objects" number="20">
<h1><span class="secnum">20</span> Fundamental Objects</h1>
Expand All @@ -3232,7 +3232,7 @@ <h1><span class="secnum">20.5.2</span> Properties of the Error Constructor</h1>
<emu-clause id="sec-error.iserror">
<h1><span class="secnum">20.5.2.1</span> Error.isError ( <var>arg</var> )</h1>
<emu-alg><ol><li>Return ?&nbsp;<emu-xref aoid="IsError" id="_ref_0"><a href="#sec-iserror">IsError</a></emu-xref>(<var>arg</var>).</li></ol></emu-alg>
<emu-alg><ol><li>Return <emu-xref aoid="IsError" id="_ref_0"><a href="#sec-iserror">IsError</a></emu-xref>(<var>arg</var>).</li></ol></emu-alg>
</emu-clause>
</emu-clause>
Expand All @@ -3241,9 +3241,9 @@ <h1><span class="secnum">20.5.8</span> Abstract Operations for Error Objects</h1
<emu-clause id="sec-iserror" type="abstract operation" number="2" class="ins" aoid="IsError">
<h1><span class="secnum">20.5.8.2</span> IsError ( <var>argument</var> )</h1>
<p>The abstract operation IsError takes argument <var>argument</var> (an Ecmascript language value) and returns either a <emu-xref href="#sec-completion-record-specification-type"><a href="https://tc39.es/ecma262/#sec-completion-record-specification-type">normal completion containing</a></emu-xref> a Boolean, or a <emu-xref href="#sec-completion-record-specification-type"><a href="https://tc39.es/ecma262/#sec-completion-record-specification-type">throw completion</a></emu-xref>. It returns a boolean indicating whether the argument is a built-in Error instance or not. It performs the following steps when called:</p>
<p>The abstract operation IsError takes argument <var>argument</var> (an Ecmascript language value) and returns a Boolean. It returns a boolean indicating whether the argument is a built-in Error instance or not. It performs the following steps when called:</p>
<emu-alg><ol><li>If <var>argument</var> <emu-xref href="#sec-object-type"><a href="https://tc39.es/ecma262/#sec-object-type">is not an Object</a></emu-xref>, return <emu-val>false</emu-val>.</li><li>If <var>argument</var> has an <var class="field">[[ErrorData]]</var> internal slot, return <emu-val>true</emu-val>.</li><li>If <var>argument</var> is a <emu-xref href="#proxy-exotic-object"><a href="https://tc39.es/ecma262/#proxy-exotic-object">Proxy exotic object</a></emu-xref>, then<ol><li>If <var>argument</var>.<var class="field">[[ProxyHandler]]</var> is <emu-val>null</emu-val>, throw a TypeError exception.</li><li>Let <var>target</var> be <var>argument</var>.<var class="field">[[ProxyTarget]]</var>.</li><li>Return ?&nbsp;<emu-xref aoid="IsError" id="_ref_1"><a href="#sec-iserror">IsError</a></emu-xref>(<var>target</var>).</li></ol></li><li>Return <emu-val>false</emu-val>.</li></ol></emu-alg>
<emu-alg><ol><li>If <var>argument</var> <emu-xref href="#sec-object-type"><a href="https://tc39.es/ecma262/#sec-object-type">is not an Object</a></emu-xref>, return <emu-val>false</emu-val>.</li><li>If <var>argument</var> has an <var class="field">[[ErrorData]]</var> internal slot, return <emu-val>true</emu-val>.</li><li>Return <emu-val>false</emu-val>.</li></ol></emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
Expand Down
8 changes: 2 additions & 6 deletions spec.emu
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ contributors: Jordan Harband
<h1>Error.isError ( _arg_ )</h1>

<emu-alg>
1. Return ? IsError(_arg_).
1. Return IsError(_arg_).
</emu-alg>
</emu-clause>
</emu-clause>
Expand All @@ -31,7 +31,7 @@ contributors: Jordan Harband
<h1>
IsError(
_argument_: an Ecmascript language value,
): either a normal completion containing a Boolean, or a throw completion
): a Boolean
</h1>
<dl class="header">
<dt>description</dt>
Expand All @@ -41,10 +41,6 @@ contributors: Jordan Harband
<emu-alg>
1. If _argument_ is not an Object, return *false*.
1. If _argument_ has an [[ErrorData]] internal slot, return *true*.
1. If _argument_ is a Proxy exotic object, then
1. If _argument_.[[ProxyHandler]] is *null*, throw a TypeError exception.
1. Let _target_ be _argument_.[[ProxyTarget]].
1. Return ? IsError(_target_).
1. Return *false*.
</emu-alg>
</emu-clause>
Expand Down

0 comments on commit 445a893

Please sign in to comment.