Skip to content

Commit 94f3f55

Browse files
authored
Spec: Fix minor type issue in consume budget if permitted (#152)
The algorithm takes a long when it should just take an integer (as the sum of many longs may not fit in a long).
1 parent b87549a commit 94f3f55

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

spec.bs

+4-3
Original file line numberDiff line numberDiff line change
@@ -697,11 +697,12 @@ null |timeout|:
697697
|currentWallTime|.
698698
1. [=set/Append=] |report| to the user agent's [=aggregatable report cache=].
699699

700-
To <dfn algorithm>consume budget if permitted</dfn> given a {{long}} |value|, an
701-
[=origin=] <var ignore=''>origin</var>, a [=context type=] |api| and a
700+
To <dfn algorithm>consume budget if permitted</dfn> given an integer |value|,
701+
an [=origin=] <var ignore=''>origin</var>, a [=context type=] |api| and a
702702
[=moment=] |currentTime|, perform [=implementation-defined=] steps. They return
703703
a [=boolean=], which indicates whether there is sufficient 'contribution budget'
704-
left to send the requested contribution |value|. This budget should be bound to
704+
left to send the requested contribution |value| (or multiple contributions with
705+
a sum of values equal to |value|). This budget should be bound to
705706
usage over time, e.g. the contribution sum over the last 24 hours. The algorithm
706707
should assume that the contribution will be sent if and only if true is
707708
returned, i.e. it should consume the budget in that case. If |value| is zero,

0 commit comments

Comments
 (0)