Fix structured cloning deserialization bug that could create invalid Date objects. Bug 602806, r=gal.

This commit is contained in:
Jason Orendorff
2010-12-03 12:15:06 -06:00
parent d91f9b75ee
commit ab076a61ee
6 changed files with 50 additions and 7 deletions

View File

@@ -152,7 +152,6 @@ using namespace js;
* Supporting functions - ECMA 15.9.1.*
*/
#define HalfTimeDomain 8.64e15
#define HoursPerDay 24.0
#define MinutesPerDay (HoursPerDay * MinutesPerHour)
#define MinutesPerHour 60.0
@@ -482,10 +481,6 @@ msFromTime(jsdouble t)
return result;
}
#define TIMECLIP(d) ((JSDOUBLE_IS_FINITE(d) \
&& !((d < 0 ? -d : d) > HalfTimeDomain)) \
? js_DoubleToInteger(d + (+0.)) : js_NaN)
/**
* end of ECMA 'support' functions
*/