Skip to content

Commit

Permalink
Change [Replaceable] setter failure behavior
Browse files Browse the repository at this point in the history
If the setter fails to reconfigure the property, throw a TypeError instead of failing silently. This matches ECMA-262 built-in behavior (since all such built-ins are treated as strict mode code), and aligns with 2/3 engines.
  • Loading branch information
shvaikalesh authored Oct 16, 2023
1 parent f356c0e commit 68db2ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -11853,7 +11853,7 @@ in which case they are exposed on every object that [=implements=] the interface
1. If |validThis| is false and |attribute| was not specified with the [{{LegacyLenientThis}}]
[=extended attribute=], then [=ECMAScript/throw=] a <l spec=ecmascript>{{TypeError}}</l>.
1. If |attribute| is declared with the [{{Replaceable}}] extended attribute, then:
1. Perform [=?=] <a abstract-op>CreateDataProperty</a>(|esValue|, |id|, |V|).
1. Perform [=?=] <a abstract-op>CreateDataPropertyOrThrow</a>(|esValue|, |id|, |V|).
1. Return <emu-val>undefined</emu-val>.
1. If |validThis| is false, then return <emu-val>undefined</emu-val>.
1. If |attribute| is declared with a [{{LegacyLenientSetter}}] extended attribute, then
Expand Down

0 comments on commit 68db2ec

Please sign in to comment.