Skip to content

Commit eb32e3e

Browse files
shvaikaleshdomenic
authored andcommitted
Editorial: Use CreateDataPropertyOrThrow abstract op in more places
1 parent 79aff82 commit eb32e3e

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

index.bs

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7740,7 +7740,7 @@ up on the ECMAScript object are not necessarily the same as the object's propert
77407740
1. If |V|[|key|] [=map/exists=], then:
77417741
1. Let |idlValue| be |V|[|key|].
77427742
1. Let |value| be the result of [=converted to an ECMAScript value|converting=] |idlValue| to an ECMAScript value.
7743-
1. Perform [=!=] <a abstract-op>CreateDataProperty</a>(|O|, |key|, |value|).
7743+
1. Perform [=!=] <a abstract-op>CreateDataPropertyOrThrow</a>(|O|, |key|, |value|).
77447744

77457745
<p class="note">Recall that if |member| has a [=dictionary member/default value=],
77467746
then |key| will always [=map/exist=] in |V|.</p>
@@ -7886,7 +7886,7 @@ ECMAScript Array values.
78867886
1. Let |E| be the result of [=converted to an ECMAScript value|converting=]
78877887
|V| to an ECMAScript value.
78887888
1. Let |P| be the result of calling [=!=] <a abstract-op>ToString</a>(|i|).
7889-
1. Call [=!=] <a abstract-op>CreateDataProperty</a>(|A|, |P|, |E|).
7889+
1. Perform [=!=] <a abstract-op>CreateDataPropertyOrThrow</a>(|A|, |P|, |E|).
78907890
1. Set |i| to |i| + 1.
78917891
1. Return |A|.
78927892
</div>
@@ -11514,7 +11514,7 @@ with the [{{LegacyNoInterfaceObject}}] [=extended attribute=].
1151411514
1. [=list/For each=] [=exposed=] [=member=] |member| of |interface|
1151511515
that is declared with the [{{Unscopable}}] [=extended attribute=]:
1151611516
1. Let |id| be |member|'s [=identifier=].
11517-
1. Perform [=!=] <a abstract-op>CreateDataProperty</a>(|unscopableObject|, |id|,
11517+
1. Perform [=!=] <a abstract-op>CreateDataPropertyOrThrow</a>(|unscopableObject|, |id|,
1151811518
<emu-val>true</emu-val>).
1151911519
1. Let |desc| be the PropertyDescriptor{\[[Value]]: |unscopableObject|,
1152011520
\[[Writable]]: <emu-val>false</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>,
@@ -12068,7 +12068,7 @@ A [=regular operation=] that does not [=have default method steps=] must not be
1206812068
1. [=map/For each=] |key| → |value| of |map|,
1206912069
1. Let |k| be |key| [=converted to an ECMAScript value=].
1207012070
1. Let |v| be |value| [=converted to an ECMAScript value=].
12071-
1. Perform [=!=] [$CreateDataProperty$](|result|, |k|, |v|).
12071+
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|result|, |k|, |v|).
1207212072
1. Return |result|.
1207312073
</div>
1207412074

@@ -12241,13 +12241,13 @@ then there must exist a property with the following characteristics:
1224112241
1. Perform [$CreateMethodProperty$](|target|, {{@@iterator}},
1224212242
{{%Array.prototype.values%}}).
1224312243
1. If |definition| has a [=value iterator=], then:
12244-
1. Perform [=!=] [$CreateDataProperty$](|target|, "<code>entries</code>",
12244+
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|target|, "<code>entries</code>",
1224512245
{{%Array.prototype.entries%}}).
12246-
1. Perform [=!=] [$CreateDataProperty$](|target|, "<code>keys</code>",
12246+
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|target|, "<code>keys</code>",
1224712247
{{%Array.prototype.keys%}}).
12248-
1. Perform [=!=] [$CreateDataProperty$](|target|, "<code>values</code>",
12248+
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|target|, "<code>values</code>",
1224912249
{{%Array.prototype.values%}}).
12250-
1. Perform [=!=] [$CreateDataProperty$](|target|, "<code>forEach</code>",
12250+
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|target|, "<code>forEach</code>",
1225112251
{{%Array.prototype.forEach%}}).
1225212252
1. Otherwise, if |definition| has a [=pair iterator=], then:
1225312253
1. Define the {{@@iterator}} and <code class="idl">entries</code> methods:
@@ -12265,7 +12265,7 @@ then there must exist a property with the following characteristics:
1226512265
1. Perform [$SetFunctionName$](|F|, "<code>entries</code>").
1226612266
1. Perform [$SetFunctionLength$](|F|, 0).
1226712267
1. Perform [$CreateMethodProperty$](|target|, {{@@iterator}}, |F|).
12268-
1. Perform [=!=] [$CreateDataProperty$](|target|, "<code>entries</code>", |F|).
12268+
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|target|, "<code>entries</code>", |F|).
1226912269
1. Define the <code class="idl">keys</code> method:
1227012270
1. Let |steps| be the following series of steps:
1227112271
1. Let |esValue| be [=?=] [$ToObject$](<emu-val>this</emu-val> value).
@@ -12279,7 +12279,7 @@ then there must exist a property with the following characteristics:
1227912279
1. Let |F| be [$CreateBuiltinFunction$](|steps|, « », |realm|).
1228012280
1. Perform [$SetFunctionName$](|F|, "<code>keys</code>").
1228112281
1. Perform [$SetFunctionLength$](|F|, 0).
12282-
1. Perform [=!=] [$CreateDataProperty$](|target|, "<code>keys</code>", |F|).
12282+
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|target|, "<code>keys</code>", |F|).
1228312283
1. Define the <code class="idl">values</code> method:
1228412284
1. Let |steps| be the following series of steps:
1228512285
1. Let |esValue| be [=?=] [$ToObject$](<emu-val>this</emu-val> value).
@@ -12293,7 +12293,7 @@ then there must exist a property with the following characteristics:
1229312293
1. Let |F| be [$CreateBuiltinFunction$](|steps|, « », |realm|).
1229412294
1. Perform [$SetFunctionName$](|F|, "<code>values</code>").
1229512295
1. Perform [$SetFunctionLength$](|F|, 0).
12296-
1. Perform [=!=] [$CreateDataProperty$](|target|, "<code>values</code>", |F|).
12296+
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|target|, "<code>values</code>", |F|).
1229712297
1. Define the <code class="idl">forEach</code> method:
1229812298
1. Let |steps| be the following series of steps, given function argument values
1229912299
|callback| and |thisArg|:
@@ -12319,7 +12319,7 @@ then there must exist a property with the following characteristics:
1231912319
1. Let |F| be [$CreateBuiltinFunction$](|steps|, « », |realm|).
1232012320
1. Perform [$SetFunctionName$](|F|, "<code>forEach</code>").
1232112321
1. Perform [$SetFunctionLength$](|F|, 1).
12322-
1. Perform [=!=] [$CreateDataProperty$](|target|, "<code>forEach</code>", |F|).
12322+
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|target|, "<code>forEach</code>", |F|).
1232312323
</div>
1232412324

1232512325

@@ -12384,8 +12384,8 @@ must be {{%IteratorPrototype%}}.
1238412384
1. Let |key| be the result of [=converted to an ECMAScript value|converting=] |idlKey| to an ECMAScript value.
1238512385
1. Let |value| be the result of [=converted to an ECMAScript value|converting=] |idlValue| to an ECMAScript value.
1238612386
1. Let |array| be [=!=] [$ArrayCreate$](2).
12387-
1. Call [=!=] [$CreateDataProperty$](|array|, "<code>0</code>", |key|).
12388-
1. Call [=!=] [$CreateDataProperty$](|array|, "<code>1</code>", |value|).
12387+
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|array|, "<code>0</code>", |key|).
12388+
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|array|, "<code>1</code>", |value|).
1238912389
1. |result| is |array|.
1239012390
</dl>
1239112391
1. Return [$CreateIterResultObject$](|result|, <emu-val>false</emu-val>).
@@ -12457,7 +12457,7 @@ and the string "<code> Iterator</code>".
1245712457
1. Perform [$SetFunctionName$](|F|, "<code>entries</code>").
1245812458
1. Perform [$SetFunctionLength$](|F|, 0).
1245912459
1. Perform [$CreateMethodProperty$](|target|, {{@@asyncIterator}}, |F|).
12460-
1. Perform [=!=] [$CreateDataProperty$](|target|, "<code>entries</code>", |F|).
12460+
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|target|, "<code>entries</code>", |F|).
1246112461
1. If |definition| has a [=pair asynchronously iterable declaration=], then define the
1246212462
<code class="idl">keys</code> method:
1246312463
1. Let |steps| be the following series of steps, given function argument values |args|:
@@ -12481,7 +12481,7 @@ and the string "<code> Iterator</code>".
1248112481
1. Let |F| be [$CreateBuiltinFunction$](|steps|, « », |realm|).
1248212482
1. Perform [$SetFunctionName$](|F|, "<code>keys</code>").
1248312483
1. Perform [$SetFunctionLength$](|F|, 0).
12484-
1. Perform [=!=] [$CreateDataProperty$](|target|, "<code>keys</code>", |F|).
12484+
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|target|, "<code>keys</code>", |F|).
1248512485
1. Define the <code class="idl">values</code>, and possibly {{@@asyncIterator}}, methods:
1248612486
1. Let |steps| be the following series of steps, given function argument values |args|:
1248712487
1. Let |esValue| be [=?=] [$ToObject$](<emu-val>this</emu-val> value).
@@ -12504,7 +12504,7 @@ and the string "<code> Iterator</code>".
1250412504
1. Let |F| be [$CreateBuiltinFunction$](|steps|, « », |realm|).
1250512505
1. Perform [$SetFunctionName$](|F|, "<code>values</code>").
1250612506
1. Perform [$SetFunctionLength$](|F|, 0).
12507-
1. Perform [=!=] [$CreateDataProperty$](|target|, "<code>values</code>", |F|).
12507+
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|target|, "<code>values</code>", |F|).
1250812508
1. If |definition| has a [=value asynchronously iterable declaration=], then perform [=!=]
1250912509
[$CreateMethodProperty$](|target|, {{@@asyncIterator}}, |F|).
1251012510
</div>
@@ -13888,21 +13888,21 @@ those of normal <code>Array</code> instances:
1388813888
1. Set |handler|.\[[SetAlgorithm]] to |setAlgorithm|.
1388913889
1. Set |handler|.\[[DeleteAlgorithm]] to |deleteAlgorithm|.
1389013890
1. Let |defineProperty| be [$CreateBuiltinFunction$](the steps from [[#es-observable-array-defineProperty]], « », |realm|).
13891-
1. Perform [=!=] [$CreateDataProperty$](|handler|, "<code>defineProperty</code>", |defineProperty|).
13891+
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|handler|, "<code>defineProperty</code>", |defineProperty|).
1389213892
1. Let |deleteProperty| be [$CreateBuiltinFunction$](the steps from [[#es-observable-array-deleteProperty]], « », |realm|).
13893-
1. Perform [=!=] [$CreateDataProperty$](|handler|, "<code>deleteProperty</code>", |deleteProperty|).
13893+
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|handler|, "<code>deleteProperty</code>", |deleteProperty|).
1389413894
1. Let |get| be [$CreateBuiltinFunction$](the steps from [[#es-observable-array-get]], « », |realm|).
13895-
1. Perform [=!=] [$CreateDataProperty$](|handler|, "<code>get</code>", |get|).
13895+
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|handler|, "<code>get</code>", |get|).
1389613896
1. Let |getOwnPropertyDescriptor| be [$CreateBuiltinFunction$](the steps from [[#es-observable-array-getOwnPropertyDescriptor]], « », |realm|).
13897-
1. Perform [=!=] [$CreateDataProperty$](|handler|, "<code>getOwnPropertyDescriptor</code>", |getOwnPropertyDescriptor|).
13897+
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|handler|, "<code>getOwnPropertyDescriptor</code>", |getOwnPropertyDescriptor|).
1389813898
1. Let |has| be [$CreateBuiltinFunction$](the steps from [[#es-observable-array-has]], « », |realm|).
13899-
1. Perform [=!=] [$CreateDataProperty$](|handler|, "<code>has</code>", |has|).
13899+
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|handler|, "<code>has</code>", |has|).
1390013900
1. Let |ownKeys| be [$CreateBuiltinFunction$](the steps from [[#es-observable-array-ownKeys]], « », |realm|).
13901-
1. Perform [=!=] [$CreateDataProperty$](|handler|, "<code>ownKeys</code>", |ownKeys|).
13901+
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|handler|, "<code>ownKeys</code>", |ownKeys|).
1390213902
1. Let |preventExtensions| be [$CreateBuiltinFunction$](the steps from [[#es-observable-array-preventExtensions]], « », |realm|).
13903-
1. Perform [=!=] [$CreateDataProperty$](|handler|, "<code>preventExtensions</code>", |preventExtensions|).
13903+
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|handler|, "<code>preventExtensions</code>", |preventExtensions|).
1390413904
1. Let |set| be [$CreateBuiltinFunction$](the steps from [[#es-observable-array-set]], « », |realm|).
13905-
1. Perform [=!=] [$CreateDataProperty$](|handler|, "<code>set</code>", |set|).
13905+
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|handler|, "<code>set</code>", |set|).
1390613906
1. Return [=!=] [$ProxyCreate$](|innerArray|, |handler|).
1390713907
</div>
1390813908

0 commit comments

Comments
 (0)