Closed Bug 1366371 Opened 4 years ago Closed 3 years ago
_t threshold = -1 seems suspicious
I didn't catch this in my review in bug 1243846, but I noticed it reading the code again now: http://searchfox.org/mozilla-central/rev/24c443a440104dabd9447608bd41b8766e8fc2f5/dom/base/DOMIntersectionObserver.cpp#410 We declare the threshold variable as a size_t (which is unsigned), and then later pass it to UpdateIntersectionObservation which takes an int32_t. If we have no intersection, we will pass -1 here. I think this works, but we should really use a signed type for this variable.
Use int32_t for intersection threshold.
Attachment #8889261 - Flags: review?(mstange)
Attachment #8889261 - Flags: review?(mstange) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/173b2aadfbab Use signed integer for intersection threshold. r=mstange
You need to log in before you can comment on or make changes to this bug.