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: quick fixes for recent merges #2129

Merged
merged 3 commits into from
Aug 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -8000,7 +8000,7 @@ <h1>Forward Progress</h1>
</emu-clause>

<emu-clause id="sec-weakref-processing-model">
<h1>Processing model of WeakRef and FinalizationRegistry objects</h1>
<h1>Processing Model of WeakRef and FinalizationRegistry Objects</h1>
<emu-clause id="sec-weakref-invariants">
<h1>Objectives</h1>

Expand Down Expand Up @@ -8072,14 +8072,14 @@ <h1>Execution</h1>
1. For each _obj_ of _S_, do
1. For each WeakRef _ref_ such that _ref_.[[WeakRefTarget]] is _obj_, do
1. Set _ref_.[[WeakRefTarget]] to ~empty~.
1. For each FinalizationRegistry _fg_ such that _fg_.[[Cells]] contains _cell_, and _cell_.[[WeakRefTarget]] is _obj_, do
1. For each FinalizationRegistry _fg_ such that _fg_.[[Cells]] contains a Record _cell_ such that _cell_.[[WeakRefTarget]] is _obj_, do
1. Set _cell_.[[WeakRefTarget]] to ~empty~.
1. Optionally, perform ! HostEnqueueFinalizationRegistryCleanupJob(_fg_).
1. For each WeakMap _map_ such that _map_.[[WeakMapData]] contains a Record value _r_ such that _r_.[[Key]] is _obj_, do
1. For each WeakMap _map_ such that _map_.[[WeakMapData]] contains a Record _r_ such that _r_.[[Key]] is _obj_, do
1. Set _r_.[[Key]] to ~empty~.
1. Set _r_.[[Value]] to ~empty~.
1. For each WeakSet _set_ such that _set_.[[WeakSetData]] contains _obj_, do
1. Replace the element of _set_ whose value is _obj_ with an element whose value is ~empty~.
1. Replace the element of _set_.[[WeakSetData]] whose value is _obj_ with an element whose value is ~empty~.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch, this seems like an actual spec bug

</emu-alg>

<emu-note>
Expand All @@ -8100,15 +8100,15 @@ <h1>Execution</h1>
<emu-clause id="sec-weakref-host-hooks">
<h1>Host Hooks</h1>

<emu-clause id="sec-host-cleanup-finalization-registry" aoid=HostEnqueueFinalizationRegistryCleanupJob>
<emu-clause id="sec-host-cleanup-finalization-registry" aoid="HostEnqueueFinalizationRegistryCleanupJob">
ljharb marked this conversation as resolved.
Show resolved Hide resolved
<h1>HostEnqueueFinalizationRegistryCleanupJob ( _finalizationRegistry_ )</h1>

<p>The abstract operation HostEnqueueFinalizationRegistryCleanupJob takes argument _finalizationRegistry_ (a FinalizationRegistry). HostEnqueueFinalizationRegistryCleanupJob is an implementation-defined abstract operation that is expected to call CleanupFinalizationRegistry(_finalizationRegistry_) at some point in the future, if possible. The host's responsibility is to make this call at a time which does not interrupt synchronous ECMAScript code execution.</p>
</emu-clause>
</emu-clause>
</emu-clause>

<emu-clause id="sec-clear-kept-objects" aoid=ClearKeptObjects>
<emu-clause id="sec-clear-kept-objects" aoid="ClearKeptObjects">
<h1>ClearKeptObjects ( )</h1>
<p>The abstract operation ClearKeptObjects takes no arguments. ECMAScript implementations are expected to call ClearKeptObjects when a synchronous sequence of ECMAScript executions completes. It performs the following steps when called:</p>
<emu-alg>
Expand All @@ -8131,10 +8131,10 @@ <h1>AddToKeptObjects ( _object_ )</h1>

<emu-clause id="sec-cleanup-finalization-registry" aoid="CleanupFinalizationRegistry">
<h1>CleanupFinalizationRegistry ( _finalizationRegistry_ )</h1>
<p>The abstract operation CleanupFinalizationRegistry takes argument _finalizationRegistry_ (a finalization registry object). It performs the following steps when called:</p>
<p>The abstract operation CleanupFinalizationRegistry takes argument _finalizationRegistry_ (a FinalizationRegistry). It performs the following steps when called:</p>
<emu-alg>
1. Assert: _finalizationRegistry_ has [[Cells]] and [[CleanupCallback]] internal slots.
1. Set _callback_ to _finalizationRegistry_.[[CleanupCallback]].
1. Let _callback_ be _finalizationRegistry_.[[CleanupCallback]].
1. While _finalizationRegistry_.[[Cells]] contains a Record _cell_ such that _cell_.[[WeakRefTarget]] is ~empty~, an implementation may perform the following steps:
1. Choose any such _cell_.
1. Remove _cell_ from _finalizationRegistry_.[[Cells]].
Expand Down Expand Up @@ -26758,6 +26758,7 @@ <h1>Function.prototype.toString ( )</h1>
<emu-grammar type="definition">
NativeFunction :
`function` NativeFunctionAccessor? PropertyName[~Yield, ~Await]? `(` FormalParameters[~Yield, ~Await] `)` `{` `[` `native` `code` `]` `}`

NativeFunctionAccessor :
`get`
`set`
Expand Down Expand Up @@ -39053,8 +39054,8 @@ <h1>WeakRef ( _target_ )</h1>
<emu-alg>
1. If NewTarget is *undefined*, throw a *TypeError* exception.
1. If Type(_target_) is not Object, throw a *TypeError* exception.
1. Let _weakRef_ be ? OrdinaryCreateFromConstructor(NewTarget, `"%WeakRef.prototype%"`, &laquo; [[WeakRefTarget]] &raquo;).
1. Perfom ! AddToKeptObjects(_target_).
1. Let _weakRef_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%WeakRef.prototype%"*, &laquo; [[WeakRefTarget]] &raquo;).
1. Perform ! AddToKeptObjects(_target_).
1. Set _weakRef_.[[WeakRefTarget]] to _target_.
1. Return _weakRef_.
</emu-alg>
Expand Down