Skip to content

Commit 7eb2c2b

Browse files
committed
feedback review from anba on PR #84: ECMA-402 v1 legacy constructor semantics compromise
1 parent e4eaa72 commit 7eb2c2b

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

spec/datetimeformat.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -380,13 +380,13 @@ <h1>UnwrapDateTimeFormat( _dtf_ )</h1>
380380
</p>
381381
<emu-normative-optional><span class="normative-optional">Normative Optional</span><div class="normative-optional-contents">
382382
<emu-alg>
383+
2. If Type(_dtf_) is Object and _dtf_ does not have an [[initializedDateTimeFormat]] internal slot and ? InstanceofOperator(dtf, %DateTimeFormat%) is true, then
383384
1. If _dtf_ does not have an [[InitializedDateTimeFormat]] internal slot and ? InstanceofOperator(_dtf_, %DateTimeFormat%) is equal *true*, then
384-
1. Let _obj_ be Get(_dtf_, Intl.[[FallbackSymbol]]).
385-
1. Let _dtf_ be ? RequireObjectCoercible(_obj_).
385+
1. Let _dtf_ be Get(_dtf_, Intl.[[FallbackSymbol]]).
386386
</emu-alg>
387387
</div></emu-normative-optional>
388388
<emu-alg>
389-
2. If _dtf_ does not have an [[InitializedDateTimeFormat]] internal slot,
389+
2. If Type(_dtf_) is not Object or _dtf_ does not have an [[initializedDateTimeFormat]] internal slot, then
390390
1. Throw a *TypeError* exception.
391391
1. Return _dtf_.
392392
</emu-alg>
@@ -416,7 +416,7 @@ <h1>Intl.DateTimeFormat ( [ _locales_ [ , _options_ ] ] )</h1>
416416
<emu-normative-optional><span class="normative-optional">Normative Optional</span><div class="normative-optional-contents">
417417
<emu-alg>
418418
4. Let _this_ be the *this* value.
419-
1. If NewTarget is *undefined* and ? InstanceofOperator(_this_, %NumberFormat%),
419+
1. If NewTarget is *undefined* and ? InstanceofOperator(_this_, %DateTimeFormat%), then
420420
1. Perform ? DefineOwnPropertyOrThrow(_this_, Intl.[[FallbackSymbol]], { [[Value]]: _dateTimeFormat_, [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
421421
1. Return _this_.
422422
</emu-alg>

spec/numberformat.html

+4-5
Original file line numberDiff line numberDiff line change
@@ -458,13 +458,12 @@ <h1>UnwrapNumberFormat( _nf_ )</h1>
458458
</p>
459459
<emu-normative-optional><span class="normative-optional">Normative Optional</span><div class="normative-optional-contents">
460460
<emu-alg>
461-
1. If _nf_ does not have an [[InitializedNumberFormat]] internal slot and ? InstanceofOperator(_nf_, %NumberFormat%)is equal *true*, then
462-
1. Let _obj_ be Get(_nf_, Intl.[[FallbackSymbol]]).
463-
1. Let _nf_ be ? RequireObjectCoercible(_obj_).
461+
1. If Type(_nf_) is Object and _nf_ does not have an [[InitializedNumberFormat]] internal slot and ? InstanceofOperator(_nf_, %NumberFormat%) is equal *true*, then
462+
1. Let _nf_ be Get(_nf_, Intl.[[FallbackSymbol]]).
464463
</emu-alg>
465464
</div></emu-normative-optional>
466465
<emu-alg>
467-
2. If _nf_ does not have an [[InitializedNumberFormat]] internal slot, then
466+
2. If Type(_nf_) is not Object or _nf_ does not have an [[InitializedNumberFormat]] internal slot, then
468467
1. Throw a *TypeError* exception.
469468
1. Return _nf_.
470469
</emu-alg>
@@ -493,7 +492,7 @@ <h1>Intl.NumberFormat ( [ _locales_ [ , _options_ ] ] )</h1>
493492
<emu-normative-optional><span class="normative-optional">Normative Optional</span><div class="normative-optional-contents">
494493
<emu-alg>
495494
4. Let _this_ be the *this* value.
496-
1. If NewTarget is *undefined* and ? InstanceofOperator(_this_, %NumberFormat%),
495+
1. If NewTarget is *undefined* and ? InstanceofOperator(_this_, %NumberFormat%), then
497496
1. Perform ? DefineOwnPropertyOrThrow(_this_, Intl.[[FallbackSymbol]], { [[Value]]: _numberFormat_, [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
498497
1. Return _this_.
499498
</emu-alg>

0 commit comments

Comments
 (0)