Backout the bug 754202 backout due to orange.

This commit is contained in:
Ryan VanderMeulen
2012-06-10 19:37:47 -04:00
parent ba702a2f83
commit 202bd53a55
848 changed files with 9502 additions and 15569 deletions

View File

@@ -2613,17 +2613,15 @@ js_Date(JSContext *cx, unsigned argc, Value *vp)
/* Date called as constructor. */
double d;
if (args.length() == 0) {
/* ES5 15.9.3.3. */
d = NowAsMillis();
} else if (args.length() == 1) {
/* ES5 15.9.3.2. */
/* Step 1. */
if (!ToPrimitive(cx, &args[0]))
return false;
if (args[0].isString()) {
/* Step 2. */
if (!args[0].isString()) {
/* the argument is a millisecond number */
if (!ToNumber(cx, args[0], &d))
return false;
d = TimeClip(d);
} else {
/* the argument is a string; parse it. */
JSString *str = ToString(cx, args[0]);
if (!str)
return false;
@@ -2636,11 +2634,6 @@ js_Date(JSContext *cx, unsigned argc, Value *vp)
d = js_NaN;
else
d = TimeClip(d);
} else {
/* Step 3. */
if (!ToNumber(cx, args[0], &d))
return false;
d = TimeClip(d);
}
} else {
double msec_time;