Closed
Bug 1366371
Opened 8 years ago
Closed 8 years ago
size_t threshold = -1 seems suspicious
Categories
(Core :: Layout, enhancement, P3)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: mstange, Assigned: tschneider)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
1.32 KB,
patch
|
mstange
:
review+
|
Details | Diff | Splinter Review |
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.
Assignee | ||
Updated•8 years ago
|
Blocks: intersection-observer
Updated•8 years ago
|
Priority: -- → P3
Assignee | ||
Comment 1•8 years ago
|
||
Use int32_t for intersection threshold.
Attachment #8889261 -
Flags: review?(mstange)
Reporter | ||
Updated•8 years ago
|
Attachment #8889261 -
Flags: review?(mstange) → review+
Assignee | ||
Comment 2•8 years ago
|
||
Pushed by tschneider@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/173b2aadfbab
Use signed integer for intersection threshold. r=mstange
Comment 4•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Updated•6 years ago
|
Assignee: nobody → tschneider
You need to log in
before you can comment on or make changes to this bug.
Description
•