Backed out changeset e057fc16e2e0 (bug 1187233) for breaking GU tests in month_day_agenda_test.js on a CLOSED TREE
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Mon, 03 Aug 2015 16:25:56 +0200
changeset 287545 c890f043b794157c27ed78d959c01ae3a9bc5d16
parent 287544 1d20bd2d28d0c9450a04221a65646e2fd8f9f6fe
child 287546 5db7295e4231ef98de92f180fc0ce0ebf783f94b
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1187233
milestone42.0a1
backs oute057fc16e2e0e61c8d352598aa87a31ec6fc4252
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset e057fc16e2e0 (bug 1187233) for breaking GU tests in month_day_agenda_test.js on a CLOSED TREE
js/src/jsdate.cpp
js/src/tests/ecma_6/Date/constructor-one-Date-argument.js
--- a/js/src/jsdate.cpp
+++ b/js/src/jsdate.cpp
@@ -3007,31 +3007,21 @@ DateNoArguments(JSContext* cx, const Cal
 }
 
 static bool
 DateOneArgument(JSContext* cx, const CallArgs& args)
 {
     MOZ_ASSERT(args.length() == 1);
 
     if (args.isConstructing()) {
-        if (args[0].isObject()) {
-            RootedObject obj(cx, &args[0].toObject());
-            if (ObjectClassIs(obj, ESClass_Date, cx)) {
-                RootedValue unboxed(cx);
-                if (!Unbox(cx, obj, &unboxed))
-                    return false;
-
-                return NewDateObject(cx, args, TimeClip(unboxed.toNumber()));
-            }
-        }
+        ClippedTime t;
 
         if (!ToPrimitive(cx, args[0]))
             return false;
 
-        ClippedTime t;
         if (args[0].isString()) {
             JSLinearString* linearStr = args[0].toString()->ensureLinear(cx);
             if (!linearStr)
                 return false;
 
             if (!ParseDate(linearStr, &t, &cx->runtime()->dateTimeInfo))
                 t = ClippedTime::NaN();
         } else {
deleted file mode 100644
--- a/js/src/tests/ecma_6/Date/constructor-one-Date-argument.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Any copyright is dedicated to the Public Domain.
- * http://creativecommonn.org/licenses/publicdomain/
- */
-
-var BUGNUMBER = 1187233;
-var summary =
-  "Passing a Date object to |new Date()| should copy it, not convert it to " +
-  "a primitive and create it from that.";
-
-print(BUGNUMBER + ": " + summary);
-
-/**************
- * BEGIN TEST *
- **************/
-
-Date.prototype.toString = Date.prototype.valueOf = null;
-var d = new Date(new Date(8675309));
-assertEq(d.getTime(), 8675309);
-
-Date.prototype.valueOf = () => 42;
-d = new Date(new Date(8675309));
-assertEq(d.getTime(), 8675309);
-
-var D = newGlobal().Date;
-
-D.prototype.toString = D.prototype.valueOf = null;
-var d = new Date(new D(3141592654));
-assertEq(d.getTime(), 3141592654);
-
-D.prototype.valueOf = () => 525600;
-d = new Date(new D(3141592654));
-assertEq(d.getTime(), 3141592654);
-
-/******************************************************************************/
-
-if (typeof reportCompare === "function")
-  reportCompare(true, true);
-
-print("Tests complete");