Skip to content

Commit

Permalink
Remove an extraneous "throw". (#649)
Browse files Browse the repository at this point in the history
* Normalize spec line endings to CRLF.

The file was mostly CRLF, so normalizing to LF would have broken lots of
in-flight PRs.

* Remove an extraneous "throw".
  • Loading branch information
jyasskin committed Jun 21, 2023
1 parent 1eef2cb commit fffbf64
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ This is detectable because it can change the set of fields that are read from th
1. Let |p| be [=a new promise=].
1. Let |queue| be the result of [=starting a new parallel queue=].
1. [=parallel queue/enqueue steps|Enqueue the following steps=] to |queue|:
1. Let |permission| be the result of [=checking interest group permissions=] with
1. Let |permission| be the result of [=checking interest group permissions=] with
|interestGroup|'s [=interest group/owner=], |frameOrigin|, and true.
1. If |permission| is false, then [=queue a task=] to [=reject=] |p| with a
"{{NotAllowedError}}" {{DOMException}} and do not run the remaining steps.
Expand Down Expand Up @@ -351,7 +351,7 @@ To <dfn>check interest group permissions</dfn> given an [=origin=]
1. If |responseBody| is null or failure, set |resource| to failure and return.
1. Let |headers| be |response|'s [=response/header list=].
1. Let |mimeType| be the result of [=header list/extracting a MIME type=] from |headers|.
1. If |mimeType| is failure or is not a [=JSON MIME Type=], throw, set |resource| to failure and return.
1. If |mimeType| is failure or is not a [=JSON MIME Type=], set |resource| to failure and return.
1. Set |resource| to |responseBody|.
1. Wait for |resource| to be set.
1. If |resource| is failure, then return false.
Expand Down Expand Up @@ -429,7 +429,7 @@ are:
1. If |owner| is failure, [=exception/throw=] a {{TypeError}}.
1. Let |name| be |group|["{{AuctionAdInterestGroupKey/name}}"].
1. Run these steps [=in parallel=]:
1. Let |permission| be the result of [=checking interest group permissions=] with
1. Let |permission| be the result of [=checking interest group permissions=] with
|owner|, |frameOrigin|, and false.
1. If |permission| is false, then [=queue a task=] to [=reject=] |p| with a
"{{NotAllowedError}}" {{DOMException}} and do not run the remaining steps.
Expand Down Expand Up @@ -571,7 +571,7 @@ To <dfn>validate and convert auction ad config</dfn> given an {{AuctionAdConfig}
|config|["{{AuctionAdConfig/auctionSignals}}"].
1. Increment |auctionConfig|'s [=auction config/pending promise count=].
1. Let |resolvedAndTypeChecked| be the promise representing performing the following steps
[=upon fulfillment=] of |auctionConfig|'s [=auction config/auction signals=] with |result|:
[=upon fulfillment=] of |auctionConfig|'s [=auction config/auction signals=] with |result|:
1. Let |auctionSignalsJSON| be the result of
[=serializing a JavaScript value to a JSON string=], given |result|.
1. If no exception was [=exception/thrown=] in the previous step:
Expand Down Expand Up @@ -764,7 +764,7 @@ To <dfn>build bid generators map</dfn> given an [=auction config=] |auctionConfi

<div algorithm="generate a bid">

To <dfn>generate a bid</dfn> given an [=ordered map=] |allTrustedBiddingSignals|, a
To <dfn>generate a bid</dfn> given an [=ordered map=] |allTrustedBiddingSignals|, a
[=string=] |auctionSignals|, a {{BiddingBrowserSignals}} |browserSignals|, a [=string=]
|perBuyerSignals|, a [=duration=] |perBuyerTimeout| in milliseconds, a [=currency tag=] |expectedCurrency|,
an [=interest group=] |ig|, and a [=moment=] |auctionStartTime|:
Expand Down Expand Up @@ -803,7 +803,7 @@ an [=interest group=] |ig|, and a [=moment=] |auctionStartTime|:
|igGenerateBid|, |auctionSignals|, |perBuyerSignals|, |trustedBiddingSignals|, |browserSignals|,
and |perBuyerTimeout|.
</div>

<div algorithm="generate and score bids">

To <dfn>generate and score bids</dfn> given an [=auction config=] |auctionConfig|, an
Expand Down Expand Up @@ -853,7 +853,7 @@ To <dfn>generate and score bids</dfn> given an [=auction config=] |auctionConfig
1. Let |allBuyersExperimentGroupId| be |auctionConfig|'s
[=auction config/all buyer experiment group id=].
1. Let |allBuyersGroupLimit| be |auctionConfig|'s
[=auction config/all buyers group limit=].
[=auction config/all buyers group limit=].
1. Wait until |auctionConfig|'s [=auction config/pending promise count=] is 0.
1. Let |auctionSignals| be |auctionConfig|'s [=auction config/auction signals=].
1. [=Assert=] |auctionSignals|, |auctionConfig|'s [=auction config/seller signals=],
Expand Down Expand Up @@ -979,7 +979,7 @@ To <dfn>generate and score bids</dfn> given an [=auction config=] |auctionConfig

<div algorithm>
To <dfn>build an interest group passed to generateBid</dfn> given an [=interest group=] |ig|:

1. Let |igGenerateBid| be a new {{GenerateBidInterestGroup}} with the following fields:
<dl>
<dt>{{GenerateBidInterestGroup/owner}}
Expand Down Expand Up @@ -1520,9 +1520,9 @@ To <dfn>report win</dfn> given a [=leading bid info=] |leadingBidInfo|, a [=stri
</div>

# K-anonymity # {#k-anonymity}

Two goals of this specification rely on applying k-anonymity thresholds:

* To prevent cross-site leaks: Inputs to event-level reporting functions, `reportWin()` and
`reportResult()`, only contain limited cross-site information. As described in
[[#privacy-considerations]], part of this limiting is done by
Expand All @@ -1535,13 +1535,13 @@ The browser enforces these k-anonymity requirements by maintaining counts of how
ad and ad component has been shown to users. These counts are maintained across users, so the counting must
be done on a central <dfn>k-anonymity server</dfn>. This specification relies on two operations to query and
increment the counts: [=query k-anonymity count=] and [=increment k-anonymity count=].

The details of how the [=k-anonymity server=] is operated and accessed are [=implementation-defined=]
but it should be done in a way that prevents the server operator from joining the identity of two
query or increment requests. One way to help prevent this is by making accesses to the server go
through an HTTP proxy that prevents the server from seeing the browsers' IP addresses.

The browser should choose a <dfn>k-anonymity threshold</dfn>, otherwise known as the value for "k",
The browser should choose a <dfn>k-anonymity threshold</dfn>, otherwise known as the value for "k",
and a <dfn>k-anonymity duration</dfn> depending
on the projected sizes of interest groups and the browser's privacy goals. For example an implementation
might choose to require a k-anonymity threshold of fifty users over a seven day period. The server
Expand Down Expand Up @@ -1588,9 +1588,9 @@ threshold when responding to [=query k-anonymity count=].
1. If [=query component ad k-anonymity count=] given |adComponentDescriptor|'s
[=ad descriptor/url=] returns false, return false.
1. Return true.

</div>

<div algorithm>
To <dfn>query reporting ID k-anonymity count</dfn> given an [=interest group=] |ig| and a [=URL=] |ad|:
1. Let |keyString| be the [=string/concatenation=] of the following strings separated with U+000A LF:
Expand Down Expand Up @@ -1770,7 +1770,7 @@ of the following global objects:
\[[IsLockFree2]], and \[[LittleEndian]] are set at the implementation's discretion.

Note: This algorithm is almost identical to [[HTML]]'s [=create an agent=] algorithm, with the
exception that we do not give
exception that we do not give
the returned agent a new [=event loop=], since it does not process
[=tasks=] within [=task sources=] in the usual way.
</div>
Expand Down Expand Up @@ -1849,7 +1849,7 @@ of the following global objects:

1. Set |finalCompletion| be [=ECMAScript/Completion Record|Completion=]([$Call$](F, `undefined`,
|arguments|)).

In |timeout| milliseconds, if the invocation of [$Call$] has not completed,
[=immediately=] interrupt the execution and set |finalCompletion| to a new
[=ECMAScript/throw completion=] given null.
Expand Down Expand Up @@ -2003,7 +2003,7 @@ an [=interest group=] |ig|, a [=currency tag=] |expectedCurrency|, a [=boolean=]

<div algorithm>
To <dfn>parse an AdRender dimension value</dfn> given a [=string=] |input|:

1. Let |position| be a [=string/position variable=], initially pointing at the start of |input|.
1. [=Strip leading and trailing ASCII whitespace=] from |input|.
1. If |input| [=string/starts with=] "`0`" but [=string/is=] not "`0`" and does not
Expand Down Expand Up @@ -2197,7 +2197,7 @@ partial interface Navigator {

The <dfn for=Navigator method>updateAdInterestGroups()</dfn> method steps are:

1. [=In parallel=], run [=interest group update=] with
1. [=In parallel=], run [=interest group update=] with
« [=relevant settings object=]'s [=environment/top-level origin=] »

</div>
Expand Down Expand Up @@ -2242,7 +2242,7 @@ The <dfn for=Navigator method>updateAdInterestGroups()</dfn> method steps are:
1. Let |parsedUpdate| be the result of [=parsing JSON bytes to an Infra value=], given |update|.
1. If |parsedUpdate| is failure, [=iteration/continue=].
1. If |parsedUpdate| is not an [=ordered map=], [=iteration/continue=].
1. If |parsedUpdate|["`name`"] exists and doesn't match |ig|'s [=interest group/name=],
1. If |parsedUpdate|["`name`"] exists and doesn't match |ig|'s [=interest group/name=],
[=iteration/continue=].
1. If |parsedUpdate|["`owner`"] exists and doesn't match |ig|'s [=interest group/owner=],
[=iteration/continue=].
Expand Down Expand Up @@ -2318,7 +2318,7 @@ The <dfn for=Navigator method>updateAdInterestGroups()</dfn> method steps are:
* |parsedURL| [=includes credentials=];
* |parsedURL| [=url/fragment=] is not null.
1. Set |ig|'s |interestGroupField| to |parsedURL|.

<dt>"`trustedBiddingSignalsKeys`"
<dd>
1. If |value| is a [=list=] of [=strings=],
Expand Down Expand Up @@ -2359,7 +2359,7 @@ The <dfn for=Navigator method>updateAdInterestGroups()</dfn> method steps are:
If this [=exception/throws=], jump to the step
labeled <i><a href=#abort-update>Abort update</a></i>.
1. [=list/Append=] |igAd| to |ig|'s |interestGroupField|.

</dl>

1. Set |ig|'s [=interest group/next update after=] to the [=current wall time=] plus 24 hours.
Expand Down Expand Up @@ -2833,7 +2833,7 @@ Information of the auction's leading bid so far when ranking scored bids.
: <dfn>highest scoring other bid owner</dfn>
:: Null or an [=origin=], initially null. The interest group owner that made bids with the
`second highest score`. Set to null if there are more than one owners made bids with the
`second highest score`.
`second highest score`.
: <dfn>top level seller</dfn>
:: Null or a [=string=]. The seller in the top level auction. Only set for component auctions, null
otherwise.
Expand Down

0 comments on commit fffbf64

Please sign in to comment.