Skip to content

Commit 0e10d02

Browse files
authored
Fix GetDisposeMethod to match consensus (#217)
1 parent b3c08b9 commit 0e10d02

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

spec.emu

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,12 +1065,13 @@ contributors: Ron Buckton, Ecma International
10651065
1. Let _method_ be ? GetMethod(_V_, @@asyncDispose).
10661066
1. If _method_ is *undefined*, then
10671067
1. Set _method_ to ? GetMethod(_V_, @@dispose).
1068-
1. Let _closure_ be a new Abstract Closure with no parameters that captures _method_ and performs the following steps when called:
1069-
1. Let _O_ be the *this* value.
1070-
1. Perform ? Call(_method_, _O_).
1071-
1. Return *undefined*.
1072-
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.
1073-
1. Return CreateBuiltinFunction(_closure_, 0, *""*, « »).
1068+
1. If _method_ is not *undefined*, then
1069+
1. Let _closure_ be a new Abstract Closure with no parameters that captures _method_ and performs the following steps when called:
1070+
1. Let _O_ be the *this* value.
1071+
1. Perform ? Call(_method_, _O_).
1072+
1. Return *undefined*.
1073+
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.
1074+
1. Return CreateBuiltinFunction(_closure_, 0, *""*, « »).
10741075
1. Else,
10751076
1. Let _method_ be ? GetMethod(_V_, @@dispose).
10761077
1. Return _method_.

0 commit comments

Comments
 (0)