Skip to content

Commit

Permalink
Fix DisposeCapability leak (#194)
Browse files Browse the repository at this point in the history
* Add NOTE to DisposeResources to indicate disposeCapability can be freed

* Add Asserts and set stack to empty on dispose

* Minor tweak to NOTE text

* Use `undefined` instead of `~empty~`

* Switch to empty list

* Minor cleanup

* Update text of NOTE
  • Loading branch information
rbuckton authored Apr 10, 2024
1 parent 0e10d02 commit 7291299
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec.emu
Original file line number Diff line number Diff line change
Expand Up @@ -1117,6 +1117,8 @@ contributors: Ron Buckton, Ecma International
1. Set _completion_ to ThrowCompletion(_error_).
1. Else,
1. Set _completion_ to _result_.
1. NOTE: After _disposeCapability_ has been disposed, it will never be used again. The contents of _disposeCapability_.[[DisposableResourceStack]] can be discarded in implementations, such as by garbage collection, at this point.
1. Set _disposeCapability_.[[DisposableResourceStack]] to a new empty List.
1. Return _completion_.
</emu-alg>
</emu-clause>
Expand Down

0 comments on commit 7291299

Please sign in to comment.