From 9e306a7464f2c7902e8f3628bfb0496be9659d51 Mon Sep 17 00:00:00 2001 From: Qingxin Wu Date: Thu, 10 Oct 2024 14:16:15 -0400 Subject: [PATCH] Fix the abort steps in promise handling --- spec.bs | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/spec.bs b/spec.bs index 83b0b674..f7bed4b7 100644 --- a/spec.bs +++ b/spec.bs @@ -1705,26 +1705,24 @@ and a [=real time reporting contributions map=] |realTimeContributionsMap|: 1. Let |compWinnerInfo| be the result of running [=generate and score bids=] with |component|, |auctionConfig|, |global|, |bidIgs|, |bidDebugReportInfoList|, and |realTimeContributionsMap|. 1. If [=recursively wait until configuration input promises resolve=] given |auctionConfig| - returns failure, or |compWinnerInfo| is failure, then: - 1. Decrement |pendingComponentAuctions| by 1. - 1. Abort these steps. - 1. If |topLevelDirectFromSellerSignalsRetrieved| is false: - 1. Let |topLevelDirectFromSellerSignals| be the result of running - [=get direct from seller signals=] given |seller|, |auctionConfig|'s - [=auction config/direct from seller signals header ad slot=], and |capturedAuctionHeaders|. - 1. Set |topLevelDirectFromSellerSignalsForSeller| to the result of running - [=get direct from seller signals for a seller=] given |topLevelDirectFromSellerSignals|. - 1. Set |topLevelDirectFromSellerSignalsRetrieved| to true. - 1. If |compWinnerInfo|'s [=leading bid info/leading bid=] is not null, then run - [=score and rank a bid=] with |auctionConfig|, |compWinnerInfo|'s - [=leading bid info/leading bid=], |leadingBidInfo|, |decisionLogicFetcher|, - |trustedScoringSignalsBatcher|, null, "top-level-auction", null, and |topLevelOrigin|. - 1. If |compWinnerInfo|'s [=leading bid info/leading non-k-anon-enforced bid=] - is not null, then run [=score and rank a bid=] with |auctionConfig|, - |compWinnerInfo|'s [=leading bid info/leading non-k-anon-enforced bid=], - |leadingBidInfo|, |decisionLogicFetcher|, |trustedScoringSignalsBatcher|, - |topLevelDirectFromSellerSignalsForSeller|, null, "top-level-auction", null, |topLevelOrigin|, - and |realTimeContributionsMap|. + does not return failure, and |compWinnerInfo| is not failure, then: + 1. If |topLevelDirectFromSellerSignalsRetrieved| is false: + 1. Let |topLevelDirectFromSellerSignals| be the result of running + [=get direct from seller signals=] given |seller|, |auctionConfig|'s + [=auction config/direct from seller signals header ad slot=], and |capturedAuctionHeaders|. + 1. Set |topLevelDirectFromSellerSignalsForSeller| to the result of running + [=get direct from seller signals for a seller=] given |topLevelDirectFromSellerSignals|. + 1. Set |topLevelDirectFromSellerSignalsRetrieved| to true. + 1. If |compWinnerInfo|'s [=leading bid info/leading bid=] is not null, then run + [=score and rank a bid=] with |auctionConfig|, |compWinnerInfo|'s + [=leading bid info/leading bid=], |leadingBidInfo|, |decisionLogicFetcher|, + |trustedScoringSignalsBatcher|, null, "top-level-auction", null, and |topLevelOrigin|. + 1. If |compWinnerInfo|'s [=leading bid info/leading non-k-anon-enforced bid=] + is not null, then run [=score and rank a bid=] with |auctionConfig|, + |compWinnerInfo|'s [=leading bid info/leading non-k-anon-enforced bid=], + |leadingBidInfo|, |decisionLogicFetcher|, |trustedScoringSignalsBatcher|, + |topLevelDirectFromSellerSignalsForSeller|, null, "top-level-auction", null, |topLevelOrigin|, + and |realTimeContributionsMap|. 1. Decrement |pendingComponentAuctions| by 1. 1. Wait until |pendingComponentAuctions| is 0. 1. If |auctionConfig|'s [=auction config/aborted=] is true, return failure.