Bug 1343729 - Only collect IPC_SYNC_LATENCY_MS on the main thread, r=billm

MozReview-Commit-ID: GtsujcVJNtW
This commit is contained in:
Michael Layzell 2017-03-07 14:16:53 -05:00
parent a01cea3a7b
commit 93bfac3b3c

View File

@ -1279,7 +1279,8 @@ MessageChannel::Send(Message* aMsg, Message* aReply)
nsDependentCString(msgName), aReply->size());
}
if (latencyMs >= kMinTelemetrySyncIPCLatencyMs) {
// NOTE: Only collect IPC_SYNC_LATENCY_MS on the main thread (bug 1343729)
if (NS_IsMainThread() && latencyMs >= kMinTelemetrySyncIPCLatencyMs) {
Telemetry::Accumulate(Telemetry::IPC_SYNC_LATENCY_MS,
nsDependentCString(msgName), latencyMs);
}