Skip to content

Commit 8e7c74d

Browse files
committed
Avoid installing the [[SetPrototypeOf]] hook for the shadow realms global
1 parent 47a3b9b commit 8e7c74d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

index.bs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11841,8 +11841,7 @@ is the concatenation of the [=interface=]'s
1184111841
When the \[[SetPrototypeOf]] internal method of a [=named properties object=] |O| is called with
1184211842
JavaScript language value |V|, the following step is taken:
1184311843

11844-
1. If |O|'s [=associated realm=]'s [=is global prototype chain mutable=] is true,
11845-
return [=?=] [$OrdinarySetPrototypeOf$](|O|, |V|).
11844+
1. Assert: |O|'s [=associated realm=]'s [=is global prototype chain mutable=] is false.
1184611845
1. Return [=?=] <a abstract-op>SetImmutablePrototype</a>(|O|, |V|).
1184711846

1184811847
</div>
@@ -13552,7 +13551,8 @@ the realm given as an argument.
1355213551
1. [=Define the iteration methods=] of |interface| on |instance| given |realm|.
1355313552
1. [=Define the asynchronous iteration methods=] of |interface| on |instance| given |realm|.
1355413553
1. [=Define the global property references=] on |instance|, given |realm|.
13555-
1. Set |instance|.\[[SetPrototypeOf]] as defined in [[#platform-object-setprototypeof]].
13554+
1. If |realm|'s [=is global prototype chain mutable=] is false, then:
13555+
1. Set |instance|.\[[SetPrototypeOf]] as defined in [[#platform-object-setprototypeof]].
1355613556
1. Otherwise, if |interfaces| contains an [=interface=] which
1355713557
[=support indexed properties|supports indexed properties=],
1355813558
[=support named properties|named properties=], or both:
@@ -13661,8 +13661,7 @@ Issue: Define those properties imperatively instead.
1366113661
[=interface=] with the [{{Global}}] [=extended attribute=] is called with
1366213662
JavaScript language value |V|, the following step is taken:
1366313663

13664-
1. If |O|'s [=associated realm=]'s [=is global prototype chain mutable=] is true,
13665-
return [=?=] [$OrdinarySetPrototypeOf$](|O|, |V|).
13664+
1. Assert: |O|'s [=associated realm=]'s [=is global prototype chain mutable=] is false.
1366613665
1. Return [=?=] <a abstract-op>SetImmutablePrototype</a>(|O|, |V|).
1366713666

1366813667
</div>

0 commit comments

Comments
 (0)