Closed
Bug 1400148
Opened 8 years ago
Closed 8 years ago
Don't use -1 to represent an unset nsCursor
Categories
(Core :: Widget, defect)
Core
Widget
Tracking
()
RESOLVED
FIXED
mozilla57
| Tracking | Status | |
|---|---|---|
| firefox57 | --- | fixed |
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
|
6.18 KB,
patch
|
karlt
:
review+
|
Details | Diff | Splinter Review |
Because UBSan complains about casting -1:
> runtime error: load of value 4294967295, which is not a valid value for type 'nsCursor'
| Assignee | ||
Comment 1•8 years ago
|
||
Attachment #8908483 -
Flags: review?(karlt)
Comment 2•8 years ago
|
||
Comment on attachment 8908483 [details] [diff] [review]
Don't use -1 to represent an unset nsCursor
Nice, thanks.
>+ // This one is used for array sizing, and so better be the last
>+ // one in this list...
>+ eCursorCount,
>+
>+ // ...except for this one.
>+ eCursorInvalid = 255
eCursorCount + 1 perhaps. I couldn't see how long the list was from the patch, but whatever is fine.
Attachment #8908483 -
Flags: review?(karlt) → review+
Comment 3•8 years ago
|
||
or -1, even...
| Assignee | ||
Comment 4•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/ff9e183ca0fe4d0f4afde67a56777769357477b8
Bug 1400148 - Don't use -1 to represent an unset nsCursor. r=karlt.
Comment 5•8 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in
before you can comment on or make changes to this bug.
Description
•