- From: Alexey Shvayka <notifications@github.com>
- Date: Sun, 10 Sep 2023 13:26:44 -0700
- To: whatwg/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Sunday, 10 September 2023 20:26:51 UTC
A step like `! CreateDataProperty(...)` asserts only that `[[DefineOwnProperty]]` is an ordinary method that can't throw, but doesn't assert that property creation is a guaranteed success because `[[DefineOwnProperty]]` only returns boolean status (it is [`Object.defineProperty`](https://tc39.es/ecma262/#sec-object.defineproperty) that throws a `TypeError`). This change replaces these steps with `! CreateDataPropertyOrThrow(...)`, asserting that property is defined successfully since all its call sites operate on newly-created objects with no non-configurable properties. ECMA-262 has no occurrences of `! CreateDataProperty(...)`. You can view, comment on, or merge this pull request online at: https://github.com/whatwg/webidl/pull/1359 -- Commit Summary -- * Editorial: Use CreateDataPropertyOrThrow abstract op in more places -- File Changes -- M index.bs (50) -- Patch Links -- https://github.com/whatwg/webidl/pull/1359.patch https://github.com/whatwg/webidl/pull/1359.diff -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/webidl/pull/1359 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/webidl/pull/1359@github.com>
Received on Sunday, 10 September 2023 20:26:51 UTC