Commit d2025011 authored by ulan's avatar ulan Committed by Commit bot

Fix data-race in default implementation of delayed task.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#29458}
parent fa7d113a
......@@ -149,6 +149,7 @@ void DefaultPlatform::CallOnForegroundThread(v8::Isolate* isolate, Task* task) {
void DefaultPlatform::CallDelayedOnForegroundThread(Isolate* isolate,
Task* task,
double delay_in_seconds) {
base::LockGuard<base::Mutex> guard(&lock_);
double deadline = MonotonicallyIncreasingTime() + delay_in_seconds;
main_thread_delayed_queue_[isolate].push(std::make_pair(deadline, task));
}
......
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