Bug 1906003 - PPA API - Fix async issue in JS Module a=RyanVM

This change fixes a bug in the PPA API's that causes multiple source/target impressions not to store properly in the data store due to a promise being returned instead of the evaluation of the statement in the compareImpression function. This causes an issue where we cannot handle multiple ads / suppliers running at the same time.

The plan is to release this in the Fx 128 release.

Original Revision: https://phabricator.services.mozilla.com/D215656

Differential Revision: https://phabricator.services.mozilla.com/D215673
This commit is contained in:
Brendan Birdsong 2024-07-03 21:38:01 +00:00
parent 35d122b08d
commit 131b4a86eb

View file

@ -163,7 +163,7 @@ export class PrivateAttributionService {
await impressionStore.put(impressions, key); await impressionStore.put(impressions, key);
} }
async compareImpression(cur, impression) { compareImpression(cur, impression) {
return cur.source === impression.source && cur.target === impression.target; return cur.source === impression.source && cur.target === impression.target;
} }