Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: third_party/WebKit/Source/modules/time_zone_monitor/TimeZoneMonitorClient.cpp

Issue 2657443005: Migrate WTF::HashSet::add() to ::insert() [part 1 of N] (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698