Skip to content

Commit

Permalink
Fix the abort steps in promise handling (WICG#1300)
Browse files Browse the repository at this point in the history
Co-authored-by: Qingxin Wu <[email protected]>
  • Loading branch information
qingxinwu and Qingxin Wu authored Oct 11, 2024
1 parent 93d50e1 commit a5912c0
Showing 1 changed file with 18 additions and 20 deletions.
38 changes: 18 additions & 20 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1723,26 +1723,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.
Expand Down

0 comments on commit a5912c0

Please sign in to comment.