Bug 1410067 - Changed use of 2^62 to Number.MAX_SAFE_INTEGER (represents 2^53 - 1) to avoid faulty behavior. r=mikedeboer

This commit is contained in:
Nicole Byer 2017-10-24 13:58:55 -03:00
Родитель acd3aaaa13
Коммит 8f2ad475dc
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -17,8 +17,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "Utils",
XPCOMUtils.defineLazyModuleGetter(this, "PrivacyLevel",
"resource://gre/modules/sessionstore/PrivacyLevel.jsm");
// MAX_EXPIRY should be 2^63-1, but JavaScript can't handle that precision.
const MAX_EXPIRY = Math.pow(2, 62);
const MAX_EXPIRY = Number.MAX_SAFE_INTEGER;
/**
* The external API implemented by the SessionCookies module.