| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "modules/time_zone_monitor/TimeZoneMonitorClient.h" | 5 #include "modules/time_zone_monitor/TimeZoneMonitorClient.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/V8Binding.h" | 7 #include "bindings/core/v8/V8Binding.h" |
| 8 #include "bindings/core/v8/V8PerIsolateData.h" | 8 #include "bindings/core/v8/V8PerIsolateData.h" |
| 9 #include "core/dom/ExecutionContext.h" | 9 #include "core/dom/ExecutionContext.h" |
| 10 #include "core/workers/WorkerBackingThread.h" | 10 #include "core/workers/WorkerBackingThread.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 HashSet<WorkerBackingThread*> posted; | 66 HashSet<WorkerBackingThread*> posted; |
| 67 for (WorkerThread* thread : threads) { | 67 for (WorkerThread* thread : threads) { |
| 68 // Ensure every WorkerBackingThread(holding one platform thread) only get | 68 // Ensure every WorkerBackingThread(holding one platform thread) only get |
| 69 // the task posted once, because one WorkerBackingThread could be shared | 69 // the task posted once, because one WorkerBackingThread could be shared |
| 70 // among multiple WorkerThreads. | 70 // among multiple WorkerThreads. |
| 71 if (posted.contains(&thread->workerBackingThread())) | 71 if (posted.contains(&thread->workerBackingThread())) |
| 72 continue; | 72 continue; |
| 73 thread->postTask(BLINK_FROM_HERE, | 73 thread->postTask(BLINK_FROM_HERE, |
| 74 crossThreadBind(&NotifyTimezoneChangeOnWorkerThread, | 74 crossThreadBind(&NotifyTimezoneChangeOnWorkerThread, |
| 75 WTF::crossThreadUnretained(thread))); | 75 WTF::crossThreadUnretained(thread))); |
| 76 posted.add(&thread->workerBackingThread()); | 76 posted.insert(&thread->workerBackingThread()); |
| 77 } | 77 } |
| 78 } | 78 } |
| 79 | 79 |
| 80 } // namespace blink | 80 } // namespace blink |
| OLD | NEW |