From 778db61360dc05d43c638e75f0afc3f88bfc98e4 Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Wed, 28 Sep 2022 16:44:02 -0700 Subject: [PATCH] Harness: Ensure $DONE called only once in async-gc.js This looks like a bug: resolveAsyncGC() is supposed to succeed if the thrown value is asyncGC.notCollected, but instead it would call $DONE() twice. An added "return" prevents that. --- harness/async-gc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/harness/async-gc.js b/harness/async-gc.js index 65a589dbae8..af4ab2075f7 100644 --- a/harness/async-gc.js +++ b/harness/async-gc.js @@ -50,6 +50,7 @@ function resolveAsyncGC(err) { if (err === asyncGC.notCollected) { // Do not fail as GC can't provide necessary resources. $DONE(); + return; } $DONE(err);