forked from WICG/turtledove
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a number of imprecisions in GenerateBidOutput handling: (WICG#664)
* Fix a number of imprecisions in generateBidOutput handling: 1. The return value of generateBid() always wins over setBid if the function completed normally; even if it's invalid. 2. setBid doesn't return true/false, it throws on invalid input. 3. 'render' is not strictly required: if the bid value is <= 0 the object is a valid representation of not bidding regardless of other fields; this is relevant because doing setBid() with it does not throw. 4. modelingSignals is actually an unrestricted double: the explainer has NaN/inf/-inf as ignored, and conveniently none of these are in the [0, 4095) range anyway. I've also scooted over the zero-argument setBid() next to its full-functioned sibling, rather than separated by a giant algorithm. * Add missing floor() and make 'bid' optional to make setBid(null) work. * Hopefully make the tougher verifier happy. * Making verifier I don't know how to run locally happy, take two * Fix buglets with AdRender, too. * Fancy <= and explicit typecast * Don't need floor again * Fix typos Qingxin pointed out. --------- Co-authored-by: Maks Orlovich <morlovich@chromium.org>
- Loading branch information
Showing
1 changed file
with
17 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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