Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial: Avoid changing internal methods of ordinary objects #901

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 11 additions & 8 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -11288,7 +11288,17 @@ with the [{{LegacyNoInterfaceObject}}] [=extended attribute=].
then set |proto| to |realm|.\[[Intrinsics]].[[{{%Error.prototype%}}]].
1. Otherwise, set |proto| to |realm|.\[[Intrinsics]].[[{{%Object.prototype%}}]].
1. Assert: <a abstract-op>Type</a>(|proto|) is Object.
1. Let |interfaceProtoObj| be [=!=] [$OrdinaryObjectCreate$](|proto|).
1. Let |interfaceProtoObj| be null.
1. 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]] »).
1. Set |interfaceProtoObj|.\[[Prototype]] to |proto|.
1. Set the internal methods of |interfaceProtoObj|
which are specific to [=immutable prototype exotic objects=]
to the definitions specified in
[=ECMA-262 Immutable prototype exotic objects=].
1. Otherwise, set |interfaceProtoObj| to [=!=] [$OrdinaryObjectCreate$](|proto|).
1. If |interface| has any [=member=] declared with the [{{Unscopable}}] [=extended attribute=],
then:

Expand All @@ -11305,13 +11315,6 @@ with the [{{LegacyNoInterfaceObject}}] [=extended attribute=].
\[[Writable]]: <emu-val>false</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>,
\[[Configurable]]: <emu-val>true</emu-val>}.
1. Perform [=!=] <a abstract-op>DefinePropertyOrThrow</a>(|interfaceProtoObj|, {{@@unscopables}}, |desc|).
1. 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 the internal methods of |interfaceProtoObj|
which are specific to [=immutable prototype exotic objects=]
to the definitions specified in
[=ECMA-262 Immutable prototype exotic objects=].
1. If |interface| is not declared with the [{{Global}}] [=extended attribute=], then:
1. [=Define the regular attributes=] of |interface| on |interfaceProtoObj| given |realm|.
1. [=Define the regular operations=] of |interface| on |interfaceProtoObj| given |realm|.
Expand Down