Closed Bug 1114351 Opened 5 years ago Closed 5 years ago

Use mozilla::IsNaN() in DOUBLE_TO_JSVAL()

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: ehsan, Assigned: ehsan)

References

Details

Attachments

(1 file)

Note that this requires making sure that IsNaN is constexpr because it
needs to be passed to the constexpr IMPL_TO_JSVALUE() function in
DOUBLE_TO_JSVAL().
Attachment #8539820 - Flags: review?(jwalden+bmo)
Assignee: nobody → ehsan.akhgari
Blocks: 927430
Comment on attachment 8539820 [details] [diff] [review]
Use mozilla::IsNaN() in DOUBLE_TO_JSVAL()

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

::: mfbt/FloatingPoint.h
@@ +114,5 @@
>     */
>    static_assert(sizeof(T) == sizeof(Bits), "Bits must be same size as T");
>  };
>  
>  /** Determines whether a double is NaN. */

Make this float/double while you're here.
Attachment #8539820 - Flags: review?(jwalden+bmo) → review+
https://hg.mozilla.org/mozilla-central/rev/f699e122b007
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in before you can comment on or make changes to this bug.