зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
acd3aaaa13
Коммит
8f2ad475dc
|
@ -17,8 +17,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "Utils",
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "PrivacyLevel",
|
XPCOMUtils.defineLazyModuleGetter(this, "PrivacyLevel",
|
||||||
"resource://gre/modules/sessionstore/PrivacyLevel.jsm");
|
"resource://gre/modules/sessionstore/PrivacyLevel.jsm");
|
||||||
|
|
||||||
// MAX_EXPIRY should be 2^63-1, but JavaScript can't handle that precision.
|
const MAX_EXPIRY = Number.MAX_SAFE_INTEGER;
|
||||||
const MAX_EXPIRY = Math.pow(2, 62);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The external API implemented by the SessionCookies module.
|
* The external API implemented by the SessionCookies module.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче