RTD: isolate submodules from each other's callbacks and exceptions - #15479
Open
florianerl wants to merge 1 commit into
Open
RTD: isolate submodules from each other's callbacks and exceptions#15479florianerl wants to merge 1 commit into
florianerl wants to merge 1 commit into
Conversation
Every call into provider code ran unguarded, so a provider that threw in init, getBidRequestData or getTargetingData took down every provider behind it in the loop. getTargetingData is also wired in as the AUCTION_END preprocess, outside the guard around the event handlers, so a throw there cost those providers their onAuctionEndEvent too. All three are now wrapped the way onDataDeletionRequest already was. Waiting is tracked by submodule identity rather than by a bare counter, so a provider that invokes its own callback twice can only clear its own slot instead of releasing the auction on another provider's behalf. That is also what lets the getBidRequestData catch drop a provider that threw: it will never call back, and the auction should not wait out auctionDelay for it.
|
This PR introduces changes that may not work on all browsers. According to Babel, the following polyfills may be needed, and they are not automatically included:
The best way to address this is to provide good test coverage, as normal PR checks run unit tests on older browsers. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of change
Bugfix
Feature
New bidder adapter
Updated bidder adapter
Code style update (formatting, local variables)
Refactoring (no functional changes, no api changes)
Build related changes
CI related changes
Does this change affect user-facing APIs or examples documented on http://prebid.org?
Other
Description of change
Every call into provider code ran unguarded, so a provider that threw in
init,getBidRequestDataorgetTargetingDatatook down every provider behind it in the loop.getTargetingDatais also wired in as the AUCTION_END preprocess, outside the guard around the event handlers, so a throw there cost those providers their onAuctionEndEvent too. All three are now wrapped the wayonDataDeletionRequestalready was.Waiting is tracked by submodule identity rather than by a bare counter, so a provider that invokes its own callback twice can only clear its own slot instead of releasing the auction on another provider's behalf. That is also what lets the
getBidRequestDatacatch drop a provider that threw: it will never call back, and the auction should not wait out auctionDelay for it.Other information