Commit 6a427e8e authored by jiayl@chromium.org's avatar jiayl@chromium.org

Fixing a race in KeyboardEventCounter::Reset.


BUG= 285279

Review URL: https://chromiumcodereview.appspot.com/23637005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221259 0039d316-1c4b-4281-b951-d872f2087c98
parent 57c0e87a
...@@ -15,7 +15,8 @@ KeyboardEventCounter::~KeyboardEventCounter() {} ...@@ -15,7 +15,8 @@ KeyboardEventCounter::~KeyboardEventCounter() {}
void KeyboardEventCounter::Reset() { void KeyboardEventCounter::Reset() {
pressed_keys_.clear(); pressed_keys_.clear();
total_key_presses_ = 0; base::subtle::NoBarrier_Store(
reinterpret_cast<base::subtle::AtomicWord*>(&total_key_presses_), 0);
} }
void KeyboardEventCounter::OnKeyboardEvent(ui::EventType event, void KeyboardEventCounter::OnKeyboardEvent(ui::EventType event,
......
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