Bug 1492570 - Resolve shadow variable warnings. r=jonco

Differential Revision: https://phabricator.services.mozilla.com/D155799
This commit is contained in:
Mike Maksymowych 2022-11-09 15:49:12 +00:00
Родитель 793353a464
Коммит 592f21d08e
2 изменённых файлов: 11 добавлений и 11 удалений

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

@ -164,7 +164,7 @@ bool Realm::ensureJitRealmExists(JSContext* cx) {
#ifdef JSGC_HASH_TABLE_CHECKS
void js::DtoaCache::checkCacheAfterMovingGC() {
MOZ_ASSERT(!s || !IsForwarded(s));
MOZ_ASSERT(!str || !IsForwarded(str));
}
#endif // JSGC_HASH_TABLE_CHECKS

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

@ -56,22 +56,22 @@ struct NativeIterator;
* is erroneously included in the measurement; see bug 562553.
*/
class DtoaCache {
double d;
double dbl;
int base;
JSLinearString* s; // if s==nullptr, d and base are not valid
JSLinearString* str; // if str==nullptr, dbl and base are not valid
public:
DtoaCache() : s(nullptr) {}
void purge() { s = nullptr; }
DtoaCache() : str(nullptr) {}
void purge() { str = nullptr; }
JSLinearString* lookup(int base, double d) {
return this->s && base == this->base && d == this->d ? this->s : nullptr;
JSLinearString* lookup(int b, double d) {
return str && b == base && d == dbl ? str : nullptr;
}
void cache(int base, double d, JSLinearString* s) {
this->base = base;
this->d = d;
this->s = s;
void cache(int b, double d, JSLinearString* s) {
base = b;
dbl = d;
str = s;
}
#ifdef JSGC_HASH_TABLE_CHECKS