use C99 isfinite() for all modern libc implementations

RESOLVED FIXED in Firefox 57

Status

()

defect
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: anarchy, Assigned: anarchy)

Tracking

unspecified
mozilla57
Points:
---

Firefox Tracking Flags

(firefox57 fixed)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

2 years ago
Posted patch Use-C99-math-isfinite.patch (obsolete) — Splinter Review
Patch is straight forward, modern libc implementations do no use finite.
Comment on attachment 8814704 [details] [diff] [review]
Use-C99-math-isfinite.patch

Review of attachment 8814704 [details] [diff] [review]:
-----------------------------------------------------------------

::: xpcom/ds/nsMathUtils.h
@@ +107,5 @@
>    // Darwin has deprecated |finite| and recommends |isfinite|. The former is
>    // not present in the iOS SDK.
>    return std::isfinite(aNum);
>  #else
> +  return isfinite(aNum);

Is isfinite different from std::isfinite? If it is the same, could it be merged into above elif?
(Assignee)

Comment 2

2 years ago
Posted patch Use-C99-math-isfinite.patch (obsolete) — Splinter Review
After further review we can switch to isfinite as finite has been depreciated and is no longer used on modern implementations
Attachment #8814704 - Attachment is obsolete: true
(Assignee)

Comment 3

2 years ago
Sorry for the noise, I attached the wrong revision of patch
Attachment #8824784 - Attachment is obsolete: true
(Assignee)

Updated

2 years ago
Attachment #8824795 - Flags: review?(jacheng)
Comment on attachment 8824795 [details] [diff] [review]
Use-C99-math-isfinite.patch

Review of attachment 8824795 [details] [diff] [review]:
-----------------------------------------------------------------

Look good to me. Make sure it can be compiled by all platforms.

But I'm not capable of reviewing this code.

Forward to Nathan to review.
Attachment #8824795 - Flags: review?(jacheng) → review?(nfroyd)
Comment on attachment 8824795 [details] [diff] [review]
Use-C99-math-isfinite.patch

Review of attachment 8824795 [details] [diff] [review]:
-----------------------------------------------------------------

Sure, we can do this.  Thanks!
Attachment #8824795 - Flags: review?(nfroyd) → review+
(Assignee)

Comment 6

2 years ago
Nathan what do we need to do in order to get this landed on mozilla-central?
just fill the keywords with "checkin-needed", I did it and the sheriff will help to land it to inbound then central.

Thank you
Keywords: checkin-needed
Assignee: nobody → anarchy

Comment 8

2 years ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4723934741c5
Use C99 math isfinite, finite has been depreciated and all modern libc implementations use isfinite. r=froydnj
Keywords: checkin-needed

Comment 9

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/4723934741c5
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.