From 7291299140f933176059a4dd53ad3f02b5b81fdc Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 10 Apr 2024 13:58:22 -0400 Subject: [PATCH] Fix `DisposeCapability` leak (#194) * 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 --- spec.emu | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec.emu b/spec.emu index d63e82f..0295215 100644 --- a/spec.emu +++ b/spec.emu @@ -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_.