Bug 1575924 - Final clang-tidy checks for Resist Fingerprinting r=timhuang

Deleting a null pointer has no effect. Else after return.

Depends on D43108

Differential Revision: https://phabricator.services.mozilla.com/D43109

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Tom Ritter 2019-08-23 07:35:32 +00:00
Родитель 3b8e75da8a
Коммит 1afafb5000
1 изменённых файлов: 7 добавлений и 8 удалений

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

@ -345,9 +345,9 @@ nsresult nsRFPService::RandomMidpoint(long long aClampedTimeUSec,
// it
if (aSecretSeed != nullptr) {
StaticMutexAutoLock lock(sLock);
if (sSecretMidpointSeed != nullptr) {
delete[] sSecretMidpointSeed;
}
delete[] sSecretMidpointSeed;
sSecretMidpointSeed = new uint8_t[kSeedSize];
memcpy(sSecretMidpointSeed, aSecretSeed, kSeedSize);
}
@ -474,12 +474,11 @@ double nsRFPService::ReduceTimePrecisionImpl(double aTime, TimeScale aTimeScale,
if (!IsTimerPrecisionReductionEnabled(aType)) {
if (!StaticPrefs::privacy_reduceTimerPrecision_unconditional()) {
return aTime;
} else {
unconditionalClamping = true;
aResolutionUSec = RFP_TIMER_UNCONDITIONAL_VALUE; // 20 microseconds
aContextMixin = 0; // Just clarifies our logging statement at the end,
// otherwise unused
}
unconditionalClamping = true;
aResolutionUSec = RFP_TIMER_UNCONDITIONAL_VALUE; // 20 microseconds
aContextMixin = 0; // Just clarifies our logging statement at the end,
// otherwise unused
}
if (aResolutionUSec <= 0) {