Skip to content

Commit e8a22f9

Browse files
committed
Reject impressions with histogramIndex >= maximum histogram size
Since they will never be able to fill a histogram.
1 parent e6966b1 commit e8a22f9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

api.bs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,6 +1242,9 @@ The <dfn method for=Attribution>saveImpression(|options|)</dfn> method steps are
12421242
[=obtain a site|obtaining a site=]
12431243
from |settings|' [=environment settings object/origin=].
12441244
1. Validate the page-supplied API inputs:
1245+
1. If |options|.{{AttributionImpressionOptions/histogramIndex}} is
1246+
greater than or equal to the [=implementation-defined=] [=maximum histogram size=],
1247+
return [=a promise rejected with=] a {{RangeError}} in |realm|.
12451248
1. If |options|.{{AttributionImpressionOptions/lifetimeDays}} is 0,
12461249
return [=a promise rejected with=] a {{RangeError}} in |realm|.
12471250
1. Clamp |options|.{{AttributionImpressionOptions/lifetimeDays}} to
@@ -1350,7 +1353,7 @@ The <dfn method for=Attribution>measureConversion(|options|)</dfn> method steps
13501353
</pre>
13511354
</div>
13521355

1353-
<div algorithm>
1356+
<div algorithm="validate AttributionConversionOptions">
13541357
To <dfn>validate {{AttributionConversionOptions}}</dfn> |options|:
13551358

13561359
1. If <a attribute for=Attribution>aggregationServices</a> does not [=map/exist|contain=]
@@ -1360,7 +1363,7 @@ To <dfn>validate {{AttributionConversionOptions}}</dfn> |options|:
13601363
is less than or equal to 0 or is greater than 4294,
13611364
throw a {{RangeError}}.
13621365
1. If |options|.{{AttributionConversionOptions/histogramSize}}
1363-
is 0 or greater than an [=implementation-defined=] maximum value,
1366+
is 0 or greater than the [=implementation-defined=] <dfn>maximum histogram size</dfn>,
13641367
throw a {{RangeError}}.
13651368
1. Switch on the value of |options|.{{AttributionConversionOptions/logic}}:
13661369
<dl class="switch">

0 commit comments

Comments
 (0)