Skip to content

Commit

Permalink
Avoid installing the [[SetPrototypeOf]] hook for the shadow realms gl…
Browse files Browse the repository at this point in the history
…obal
  • Loading branch information
Ms2ger committed Nov 15, 2024
1 parent 47a3b9b commit 8e7c74d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -11841,8 +11841,7 @@ is the concatenation of the [=interface=]'s
When the \[[SetPrototypeOf]] internal method of a [=named properties object=] |O| is called with
JavaScript language value |V|, the following step is taken:

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

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

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

</div>
Expand Down

0 comments on commit 8e7c74d

Please sign in to comment.