Closed Bug 938939 Opened 11 years ago Closed 11 years ago

Fix SVGContentUtils::ParseInteger documentation about numbers that cannot be represented by an int32_t

Categories

(Core :: SVG, defect, P5)

x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: dholbert, Assigned: longsonr)

References

Details

(Whiteboard: [qa-])

While reviewing bug 937614, I noticed that the comment... > 170 * Parsing fails if the number cannot be represented by an int32_t. ...documentation for SVGContentUtils::ParseInteger() isn't actually correct. MXR link: http://mxr.mozilla.org/mozilla-central/source/content/svg/content/src/SVGContentUtils.h#170 http://mxr.mozilla.org/mozilla-central/source/content/svg/content/src/SVGContentUtils.cpp#553 We only fail if we encounter a non-digit character. For values outside of the numeric limits for an int32_t, we clamp and return true. We should update the documentation to indicate that. (This comment used to be correct, but we changed the behavior in bug 919319 comment 9.) (Note that this affects the new version of ParseInteger introduced in bug 937614, too.)
(holding off on fixing this to avoid bitrotting bug 937614, BTW.)
Component: Disability Access APIs → SVG
Depends on: 937614
Are you sure you don't want me to just fold this into bug 937614?
Feel free, if you'd like!
(I didn't mention it there because it was an existing, only tangentially related thing, and I didn't want to pile on too many things to that bug.) (More review comments coming over there soon. :))
Priority: -- → P5
Fixed by checkin for bug 937614
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Assignee: nobody → longsonr
Target Milestone: --- → mozilla28
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.