Bug 964583 - Revert Web IDL [EnforceRange] (unsigned) long long boundary conditions to match ES6. r=bz

This commit is contained in:
John Dai 2016-04-20 03:12:00 +02:00
parent 26268f8e57
commit 706b538497

View File

@ -190,10 +190,10 @@ struct PrimitiveConversionTraits_Limits {
template<>
struct PrimitiveConversionTraits_Limits<int64_t> {
static inline int64_t min() {
return -(1LL << 53);
return -(1LL << 53) + 1;
}
static inline int64_t max() {
return (1LL << 53);
return (1LL << 53) - 1;
}
};
@ -203,7 +203,7 @@ struct PrimitiveConversionTraits_Limits<uint64_t> {
return 0;
}
static inline uint64_t max() {
return (1LL << 53);
return (1LL << 53) - 1;
}
};