-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prebid core: fix adUnits for auction at the time requestBids is called #8637
Prebid core: fix adUnits for auction at the time requestBids is called #8637
Conversation
Tagging @snapwich to possibly review the new code in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from a fun-hooks perspective i don't think there should be any issue copying the methods from one function to another. i don't quite understand why that is necessary here, couldn't you just clone the adunits in requestBids
to begin with without the use of this delegate
?
either way i think this should work.
@snapwich there are various "before" hooks on requestBids, with many of them also falling back to the global The high-priority hook was my first attempt, but I found it too hard to test, because a lot of "unit" tests already modify the global hook configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Type of change
Description of change
If a publisher calls
pbjs.addAdUnits
orpbjs.removeAdUnit
after callingrequestBids
, those calls might have an effect on ongoing auctions - depending on whether any module needs to defer the start of the auction (for example, ifconsentManagement
needs to look up consent data).This changes
requestBids
to always use the adUnits that were defined at the moment it's called.Other information
Closes #8628