diff --git a/index.bs b/index.bs index e37f560e..0497b228 100644 --- a/index.bs +++ b/index.bs @@ -9687,6 +9687,13 @@ from other interfaces. Specifically: will correspond to properties on the object itself rather than on [=interface prototype objects=]. +All [=realms=] have an is global prototype chain mutable boolean, +which can be set when the [=realm=] is created. +Its value can not change during the lifetime of the [=realm=]. +By default it is set to false. + +

This allows the ShadowRealm global to have a mutable prototype.

+
Placing named properties on an object in the prototype chain @@ -11498,7 +11505,9 @@ with the [{{LegacyNoInterfaceObject}}] [=extended attribute=]. 1. Otherwise, set |proto| to |realm|.\[[Intrinsics]].[[{{%Object.prototype%}}]]. 1. Assert: Type(|proto|) is Object. 1. Let |interfaceProtoObj| be null. - 1. If |interface| is declared with the [{{Global}}] [=extended attribute=], or + 1. If |realm|'s [=is global prototype chain mutable=] is true, then: + 1. Set |interfaceProtoObj| to [$OrdinaryObjectCreate$](|proto|). + 1. Otherwise, if |interface| is declared with the [{{Global}}] [=extended attribute=], or |interface| is in the set of [=inherited interfaces=] of an interface that is declared with the [{{Global}}] [=extended attribute=], then: 1. Set |interfaceProtoObj| to [$MakeBasicObject$](« \[[Prototype]], \[[Extensible]] »). @@ -11676,6 +11685,8 @@ is the concatenation of the [=interface=]'s When the \[[SetPrototypeOf]] internal method of a [=named properties object=] |O| is called with ECMAScript 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. Return [=?=] SetImmutablePrototype(|O|, |V|).
@@ -13494,6 +13505,8 @@ Issue: Define those properties imperatively instead. [=interface=] with the [{{Global}}] [=extended attribute=] is called with ECMAScript 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. Return [=?=] SetImmutablePrototype(|O|, |V|).