WICG / attribution-reporting-api

Attribution Reporting API
https://wicg.github.io/attribution-reporting-api/
Other
370 stars 173 forks source link

Remove redundant inclusion of pending source in scope records #1409

Closed apasel422 closed 2 months ago

apasel422 commented 2 months ago

The intent of this algorithm is that the pending source is never rejected, but including it in the record list makes it seem like it can be removed; that is only prevented by the "if selectedScopes does not contain record[0]" check.

The pending source's scopes are already included in the selected scopes set, so processing the pending source in the scopeRecords loop is redundant: The insertions will not have effect (the value is already contained), and the containment check vacuously succeeds for the same reason.


Preview | Diff