Closed
Bug 791777
Opened 13 years ago
Closed 11 years ago
Remove NS_finite() and use mozilla::IsFinite
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
mozilla35
People
(Reporter: nenolod, Assigned: anujagarwal464, Mentored)
Details
Attachments
(1 file, 2 obsolete files)
|
30.53 KB,
patch
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:15.0) Gecko/20100101 Firefox/15.0.1
Build ID: 20120905151427
Steps to reproduce:
::isfinite() / std::isfinite() is supported across all platforms other than windows as it is a component of both C99 and POSIX 2008.
Comment 1•11 years ago
|
||
Nathan suggested: "I think a more reasonable thing to do would be to remove NS_finite completely and use mozilla::IsFinite from mfbt/FloatingPoint.h."
Anuj expressed some interest in this. Let me know if you need some help figuring this out, I'll try taking a look at the relevant code in the next day or two.
Assignee: nobody → anujagarwal464
Mentor: continuation
| Assignee | ||
Updated•11 years ago
|
Summary: [patch] please use POSIX-mandated isfinite() in xpcom's NS_finite() on all platforms other than windows → Remove NS_finite() and use mozilla::IsFinite
| Assignee | ||
Comment 2•11 years ago
|
||
Attachment #8496029 -
Flags: feedback?(nfroyd)
| Assignee | ||
Updated•11 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 3•11 years ago
|
||
Comment on attachment 8496029 [details] [diff] [review]
bug791777-part1.diff
Review of attachment 8496029 [details] [diff] [review]:
-----------------------------------------------------------------
This looks like a good start. I'm assuming you're planning on replacing the other instances, too?
Attachment #8496029 -
Flags: feedback?(nfroyd) → feedback+
Comment 4•11 years ago
|
||
I suggested he start with one file and get feedback on it to make sure he was on the right track before writing the full patch. :)
| Assignee | ||
Comment 5•11 years ago
|
||
Attachment #8496029 -
Attachment is obsolete: true
Attachment #8496177 -
Flags: review?(nfroyd)
Comment 6•11 years ago
|
||
Comment on attachment 8496177 [details] [diff] [review]
bug791777.diff
Review of attachment 8496177 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with the changes below.
::: content/base/public/nsContentUtils.h
@@ +2356,5 @@
> * series of additions will not be finite if any one of the operands in the
> * series is not finite.
> */
> #define NS_ENSURE_FINITE(f, rv) \
> + if (!IsFinite(f)) { \
These NS_ENSURE_FINITE* macros should use the mozilla:: prefix on IsFinite to avoid namespace conflicts.
Also, please indent the trailing slashes on the lines you change to line up with the rest of the trailing slashes in the macro.
Attachment #8496177 -
Flags: review?(nfroyd) → review+
| Assignee | ||
Comment 7•11 years ago
|
||
Attachment #8496177 -
Attachment is obsolete: true
| Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 8•11 years ago
|
||
Keywords: checkin-needed
Comment 9•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in
before you can comment on or make changes to this bug.
Description
•