Skip to content

Commit 68db2ec

Browse files
authored
Change [Replaceable] setter failure behavior
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.
1 parent f356c0e commit 68db2ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.bs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11853,7 +11853,7 @@ in which case they are exposed on every object that [=implements=] the interface
1185311853
1. If |validThis| is false and |attribute| was not specified with the [{{LegacyLenientThis}}]
1185411854
[=extended attribute=], then [=ECMAScript/throw=] a <l spec=ecmascript>{{TypeError}}</l>.
1185511855
1. If |attribute| is declared with the [{{Replaceable}}] extended attribute, then:
11856-
1. Perform [=?=] <a abstract-op>CreateDataProperty</a>(|esValue|, |id|, |V|).
11856+
1. Perform [=?=] <a abstract-op>CreateDataPropertyOrThrow</a>(|esValue|, |id|, |V|).
1185711857
1. Return <emu-val>undefined</emu-val>.
1185811858
1. If |validThis| is false, then return <emu-val>undefined</emu-val>.
1185911859
1. If |attribute| is declared with a [{{LegacyLenientSetter}}] extended attribute, then

0 commit comments

Comments
 (0)