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

Unified Diff: ipc/ipc_sync_message.cc

Issue 9297009: Remove static initializer in dummy_event (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_sync_message.cc
diff --git a/ipc/ipc_sync_message.cc b/ipc/ipc_sync_message.cc
index e276263458f3c228d4644647b50274a766646552..3b093ae52fe7109069bd378e1d83ce0abc451ef7 100644
--- a/ipc/ipc_sync_message.cc
+++ b/ipc/ipc_sync_message.cc
@@ -20,8 +20,6 @@ namespace IPC {
static base::AtomicSequenceNumber g_next_id(base::LINKER_INITIALIZED);
-static base::WaitableEvent* dummy_event = new base::WaitableEvent(true, true);
-
SyncMessage::SyncMessage(
int32 routing_id,
uint32 type,
@@ -50,6 +48,7 @@ MessageReplyDeserializer* SyncMessage::GetReplyDeserializer() {
void SyncMessage::EnableMessagePumping() {
DCHECK(!pump_messages_event_);
+ static base::WaitableEvent* dummy_event = new base::WaitableEvent(true, true);
jam 2012/01/27 18:19:04 I don't believe this is thread safe, i.e. if it's
Tyler Breisacher (Chromium) 2012/01/30 22:58:03 Right, sorry. What do you think is the right way t
jam 2012/02/01 17:01:20 use LazyInstance. it's thread-safe
set_pump_messages_event(dummy_event);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698