convert JS_MIN and JS_MAX to emeritus status

RESOLVED FIXED in mozilla17

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Benjamin, Assigned: Benjamin)

Tracking

unspecified
mozilla17
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
We have perfectly nice typed replacements: Min and Max. JS_MIN and JS_MAX should die before some other innocent soul starts using them.
(Assignee)

Comment 1

5 years ago
Created attachment 648584 [details] [diff] [review]
kill 'em

This is fairly straightforward. Being templates, Min and Max are persnickety about their types; I had to add a bit of casting. I also had to inline one JS_MIN in jsd.
Assignee: general → bpeterson
Attachment #648584 - Flags: review?(luke)

Comment 2

5 years ago
Comment on attachment 648584 [details] [diff] [review]
kill 'em

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

I'd try server with "try: -b do -p all -u none -t none" to make sure there are no surprise template compiler errors and catch any surprise uses outside js/src.

::: js/src/json.cpp
@@ +701,5 @@
>      if (space.isNumber()) {
>          /* Step 6. */
>          double d;
>          JS_ALWAYS_TRUE(ToInteger(cx, space, &d));
> +        d = Min(10., d);

How about 10.0 instead?
Attachment #648584 - Flags: review?(luke) → review+
(Assignee)

Comment 3

5 years ago
(In reply to Luke Wagner [:luke] from comment #2)
> Comment on attachment 648584 [details] [diff] [review]
> kill 'em
> 
> Review of attachment 648584 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> I'd try server with "try: -b do -p all -u none -t none" to make sure there
> are no surprise template compiler errors and catch any surprise uses outside
> js/src.
> 
> ::: js/src/json.cpp
> @@ +701,5 @@
> >      if (space.isNumber()) {
> >          /* Step 6. */
> >          double d;
> >          JS_ALWAYS_TRUE(ToInteger(cx, space, &d));
> > +        d = Min(10., d);
> 
> How about 10.0 instead?

Okay.
(Assignee)

Comment 4

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/20c3e03a259a
https://hg.mozilla.org/mozilla-central/rev/20c3e03a259a
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.