зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1543393 - shardIndex should not use ceil(); r=chutten
Differential Revision: https://phabricator.services.mozilla.com/D26909 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
1a53df3674
Коммит
6b0c93a5f1
|
@ -213,8 +213,7 @@ nsresult AppEncodeTo(const StaticMutexAutoLock& lock,
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
MOZ_ASSERT(index < gOriginsList->Length());
|
||||
size_t shardIndex =
|
||||
ceil(static_cast<double>(index) / PrioEncoder::gNumBooleans);
|
||||
size_t shardIndex = index / PrioEncoder::gNumBooleans;
|
||||
MOZ_ASSERT(shardIndex < metricData.Length());
|
||||
MOZ_ASSERT(index % PrioEncoder::gNumBooleans <
|
||||
metricData[shardIndex].Length());
|
||||
|
@ -248,8 +247,8 @@ void TelemetryOrigin::InitializeGlobalState() {
|
|||
// The contents and order of this array matters.
|
||||
// Both ensure a consistent app-encoding.
|
||||
gOriginsList = new nsTArray<const char*>({
|
||||
"doubleclick.de",
|
||||
"fb.com",
|
||||
"doubleclick.de",
|
||||
});
|
||||
|
||||
gPrioDatasPerMetric =
|
||||
|
|
Загрузка…
Ссылка в новой задаче