Skip to content

Commit

Permalink
Ignore return value of [Symbol.dispose]() method when hint is 'async-…
Browse files Browse the repository at this point in the history
…dispose' (#180)

* Ignore return value of [Symbol.dispose]() method when hint is 'async-dispose'

* Apply suggestions from PR
  • Loading branch information
rbuckton committed Jul 13, 2023
1 parent a3edfa6 commit 8b70979
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec.emu
Expand Up @@ -1068,6 +1068,12 @@ contributors: Ron Buckton, Ecma International
1. Let _method_ be ? GetMethod(_V_, @@asyncDispose).
1. If _method_ is *undefined*, then
1. Set _method_ to ? GetMethod(_V_, @@dispose).
1. Let _closure_ be a new Abstract Closure with no parameters that captures _method_ and performs the following steps when called:
1. Let _O_ be the *this* value.
1. Perform ? Call(_method_, _O_).
1. Return *undefined*.
1. NOTE: This function is not observable to user code. It is used to ensure that a Promise returned from a synchronous `@@dispose` method will not be awaited.
1. Return CreateBuiltinFunction(_closure_, 0, *""*, « »).
1. Else,
1. Let _method_ be ? GetMethod(_V_, @@dispose).
1. Return _method_.
Expand Down

0 comments on commit 8b70979

Please sign in to comment.