Skip to content

Commit

Permalink
Use map set in proper positions
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Dec 16, 2024
1 parent 34b1520 commit a7067ea
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2752,15 +2752,15 @@ are [=strings=] and values are [=tuples=] consisting of an interger and an integ
1. [=map/For each=] |name| → |value| in |result|["interestGroupNames"]:
1. If |indexMap|[|name|] does not equal to |result|["index"], return « null, null, null ».
1. [=map/Set=] |perInterestGroupData|[|name|] to |value|.
1. If |result| [=map/contains=] "`dataVersion`", set |dataVersion|[|name|] to |result|["dataVersion"].
1. If |result| [=map/contains=] "`dataVersion`", [=map/set=] |dataVersion|[|name|] to |result|["dataVersion"].
1. [=map/For each=] |key| → |value| in |result|["keys"]:
1. Set |signalsMap|[|key|] to |value|.
1. [=map/Set=] |signalsMap|[|key|] to |value|.
1. Otherwise:
1. [=map/For each=] |url| → |value| in |result|["renderUrls"]:
1. Set |signalsMap|[|url|] to |value|.
1. If |result| [=map/contains=] `"dataVersion"`, set |dataVersion|[|url|] to |result|["dataVersion"].
1. [=map/Set=] |signalsMap|[|url|] to |value|.
1. If |result| [=map/contains=] `"dataVersion"`, [=map/set=] |dataVersion|[|url|] to |result|["dataVersion"].
1. [=map/For each=] |url| → |value| in |result|["adComponentRenderUrls"]:
1. Set |signalsMap|[|url|] to |value|.
1. [=map/Set=] |signalsMap|[|url|] to |value|.
1. If |signalsMap| is not empty, set |signals| to |signalsMap|.
1. Return « |signals|, |perInterestGroupData|, |dataVersion| ».

Expand Down Expand Up @@ -8368,7 +8368,7 @@ To <dfn>batch or fetch trusted bidding signals</dfn> given a [=trusted bidding s
1. Let |key| be [=tuple=] of (|ig|'s [=interest group/joining origin=], |ig|'s [=interest group/owner=]).
1. If |keyValueInterestGroups| [=map/contains=] |key|, [=set/append=] |ig| to
|keyValueInterestGroups|[|key|].
1. Otherwise, set |keyValueInterestGroups|[|key|] to a [=set=] « |ig| ».
1. Otherwise, [=map/set=] |keyValueInterestGroups|[|key|] to a [=set=] « |ig| ».

</div>

Expand Down Expand Up @@ -8430,7 +8430,7 @@ an {{unsigned short}}-or-null |experimentGroupId|, an [=origin=] |topLevelOrigin
1. Let |metadata| be an empty [=map=], whose [=map/keys=] and [=map/values=] are [=strings=].
1. Let |hostname| be the result of [=string/UTF-8 percent-encoding=] the
[=serialization of an origin|serialized=] |topLevelOrigin| using [=component percent-encode set=].
1. Set |metadata|["hostname"] to |hostname|.
1. [=map/Set=] |metadata|["hostname"] to |hostname|.
1. Let |keyInfo| be the result of [=looking up the server encryption key=] with |owner| and
|coordinator|.
1. If |keyInfo| is failure, then return « null, null, null ».
Expand Down Expand Up @@ -8677,7 +8677,7 @@ To <dfn>build trusted key value scoring signals request body</dfn> given a non-e
1. If |compressionGroupMap| does not [=map/contain=] |compressionGroupId|, then set
|compressionGroupMap|[|compressionGroupId|] to an empty [=map=], whose [=map/keys=] are integers.
1. Let |partitionId| be [=map/size=] of |compressionGroupMap|[|compressionGroupId|].
1. Set |renderUrlIdMap|[|request|'s [=trusted scoring signals request/render URL=]] to [=tuple=]
1. [=map/Set=] |renderUrlIdMap|[|request|'s [=trusted scoring signals request/render URL=]] to [=tuple=]
of (|compressionGroupId|, |partitionId|).
1. [=map/Set=] |compressionGroupMap|[|compressionGroupId|][|partitionId|] to a [=scoring partition=] with the
following [=struct/items=]:
Expand All @@ -8700,7 +8700,7 @@ To <dfn>build trusted key value scoring signals request body</dfn> given a non-e
1. Let |hostname| be the result of [=string/UTF-8 percent-encoding=] the
[=serialization of an origin|serialized=] |firstRequest|'s [=trusted scoring signals request/top
level origin=] using [=component percent-encode set=].
1. Set |metadata|["hostname"] to |hostname|.
1. [=map/Set=] |metadata|["hostname"] to |hostname|.
1. Let |keyInfo| be the result of [=looking up the server encryption key=] with |firstRequest|'s
[=trusted scoring signals request/seller=] and |firstRequest|'s [=trusted scoring signals
request/signal coordinator=].
Expand Down

0 comments on commit a7067ea

Please sign in to comment.