Index: src/libplatform/default-platform.cc |
diff --git a/src/libplatform/default-platform.cc b/src/libplatform/default-platform.cc |
index 2e13cc09042a896a62aec3525890f8d72a22eb3d..b41c5852a82119aaa074e6b74b7b5c47e957df97 100644 |
--- a/src/libplatform/default-platform.cc |
+++ b/src/libplatform/default-platform.cc |
@@ -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)); |
} |