From 4b9419109031becf4280982d98940a1edfd39f6f Mon Sep 17 00:00:00 2001 From: Tooru Fujisawa Date: Wed, 19 Jun 2024 16:31:26 +0000 Subject: [PATCH] Bug 1901411 - Part 2: Fix sanity check for debugger. r=mgaudet, a=dmeehan Differential Revision: https://phabricator.services.mozilla.com/D213352 --- js/src/vm/AsyncIteration.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/src/vm/AsyncIteration.cpp b/js/src/vm/AsyncIteration.cpp index 05ac6e6af85e..b05dd90923d0 100644 --- a/js/src/vm/AsyncIteration.cpp +++ b/js/src/vm/AsyncIteration.cpp @@ -801,8 +801,7 @@ class MOZ_STACK_CLASS MaybeEnterAsyncGeneratorRealm { [[nodiscard]] static bool AsyncGeneratorMethodSanityCheck( JSContext* cx, Handle generator) { - if (generator->isCompleted() || generator->isSuspendedStart() || - generator->isSuspendedYield()) { + if (generator->isSuspendedStart() || generator->isSuspendedYield()) { // The spec assumes the queue is empty when async generator methods are // called with those state, but our debugger allows calling those methods // in unexpected state, such as before suspendedStart.