Commit 91de260e authored by miletus's avatar miletus Committed by Commit bot

Make ScrollUpdate LatencyInfo's sequence number less likely to have conflicts

BUG=472073

Review URL: https://codereview.chromium.org/1089643002

Cr-Commit-Position: refs/heads/master@{#325458}
parent fe30635b
......@@ -71,9 +71,11 @@ void LatencyInfoSwapPromiseMonitor::OnForwardScrollUpdateToMainThreadOnImpl() {
it != latency_->latency_components.end(); ++it) {
if (it->first.first == ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT) {
new_sequence_number =
(static_cast<int64>(base::PlatformThread::CurrentId()) << 32) |
((static_cast<int64>(base::PlatformThread::CurrentId()) << 32) ^
(reinterpret_cast<uint64>(this) << 32)) |
(it->second.sequence_number & 0xffffffff);
DCHECK(new_sequence_number != it->second.sequence_number);
if (new_sequence_number == it->second.sequence_number)
return;
break;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment