@@ -138,6 +138,14 @@ dictionary PADebugModeOptions {
138
138
};
139
139
</xmp>
140
140
141
+ Issue: Per the <a href=https://www.w3.org/TR/design-principles/#numeric-types>
142
+ Web Platform Design Principles</a> , we should consider switching `long` to
143
+ `[EnforceRange] long long`.
144
+
145
+ Issue: {{PrivateAggregation/enableDebugMode(options)}} 's argument should not
146
+ have a default value of `{}`. Alternatively, {{PADebugModeOptions/debugKey}}
147
+ should not be required in {{PADebugModeOptions}} .
148
+
141
149
Each {{PrivateAggregation}} object has the following fields:
142
150
<dl dfn-for="PrivateAggregation">
143
151
: <dfn>scoping details</dfn> (default null)
@@ -1048,12 +1056,12 @@ steps. They return an [=aggregation coordinator=], null or a {{DOMException}}:
1048
1056
To <dfn algorithm>obtain the context ID</dfn> given a
1049
1057
{{SharedStorageRunOperationMethodOptions}} |options|, perform the following
1050
1058
steps. They return a [=string=] , null, or a {{DOMException}} :
1051
- 1. If |options|["` privateAggregationConfig`"] does not [=map/exist=] , return
1052
- null.
1053
- 1. If |options|["` privateAggregationConfig` "]["` contextId`"] does not [=map/
1054
- exist=] , return null.
1055
- 1. Set |contextId| to
1056
- |options|["` privateAggregationConfig` "]["` contextId` "] .
1059
+ 1. If |options|["{{SharedStorageRunOperationMethodOptions/ privateAggregationConfig}}"]
1060
+ does not [=map/exist=] , return null.
1061
+ 1. If |options|["{{SharedStorageRunOperationMethodOptions/ privateAggregationConfig}} "]["{{SharedStoragePrivateAggregationConfig/ contextId}}"]
1062
+ does not [=map/ exist=] , return null.
1063
+ 1. Let |contextId| be
1064
+ |options|["{{SharedStorageRunOperationMethodOptions/ privateAggregationConfig}} "]["{{SharedStoragePrivateAggregationConfig/ contextId}} "] .
1057
1065
1. If |contextId|'s [=string/length=] is greater than 64, return a new
1058
1066
{{DOMException}} with name "`DataError`".
1059
1067
1. Return |contextId|.
@@ -1294,12 +1302,23 @@ event, PAExtendedHistogramContribution contribution)</dfn> method steps are:
1294
1302
value=] , [=exception/throw=] a {{TypeError}} .
1295
1303
1. If |bucket|["{{PASignalValue/offset}}"] is not a {{bigint}} , [=exception/
1296
1304
throw=] a {{TypeError}} .
1305
+ 1. Otherwise, if |contribution|["{{PAExtendedHistogramContribution/bucket}}"] is
1306
+ not in the range [0, 2<sup>128</sup>−1] , [=exception/throw=] a
1307
+ {{TypeError}} .
1308
+
1309
+ Issue: Make the error type consistent with
1310
+ {{PrivateAggregation/contributeToHistogram(contribution)}} .
1297
1311
1. Let |value| be |contribution|["{{PAExtendedHistogramContribution/value}}"] .
1298
1312
1. If |value| is a {{PASignalValue}} :
1299
1313
1. If |value|["{{PASignalValue/baseValue}}"] is not a valid [=signal base
1300
1314
value=] , [=exception/throw=] a {{TypeError}} .
1301
1315
1. If |value|["{{PASignalValue/offset}}"] is a {{bigint}} , [=exception/
1302
1316
throw=] a {{TypeError}} .
1317
+ 1. Otherwise, if |contribution|["{{PAHistogramContribution/value}}"] is
1318
+ negative, [=exception/throw=] a {{TypeError}} .
1319
+
1320
+ Issue: Make the error types on validation issues here and above consistent
1321
+ with {{PrivateAggregation/contributeToHistogram(contribution)}} .
1303
1322
1. Let |batchingScope| be null.
1304
1323
1. If |event| [=string/starts with=] "`reserved.`", set |batchingScope| to the
1305
1324
result of running |scopingDetails|' [=scoping details/get batching scope
@@ -1973,10 +1992,10 @@ To <dfn>fill in the contribution</dfn> given a
1973
1992
following steps. They return a {{PAHistogramContribution}} .
1974
1993
1. Let |bucket| be |contribution|["{{PAExtendedHistogramContribution/bucket}}"] .
1975
1994
1. If |bucket| is a {{PASignalValue}} , set |bucket| to the result of [=filling
1976
- in the signal value=] given |bucket|, 65535 and |leadingBidInfo|.
1995
+ in the signal value=] given |bucket|, 2 <sup> 128 </sup> −1 and |leadingBidInfo|.
1977
1996
1. Let |value| be |contribution|["{{PAExtendedHistogramContribution/value}}"] .
1978
1997
1. If |value| is a {{PASignalValue}} , set |value| to the result of [=filling in
1979
- the signal value=] given |value|, 2<sup> 128 </sup> −1 and |leadingBidInfo|.
1998
+ the signal value=] given |value|, 2<sup> 31 </sup> −1 and |leadingBidInfo|.
1980
1999
1. Return a new {{PAHistogramContribution}} with the items:
1981
2000
: {{PAHistogramContribution/bucket}}
1982
2001
:: |bucket|
0 commit comments