diff options
author | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-24 16:48:26 +0000 |
---|---|---|
committer | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-24 16:48:26 +0000 |
commit | 867e46d0a91880fdf7fbc5649f9028b73c2886ed (patch) | |
tree | 72c3bffef6a17b5d3dab358a4c197e04e09d1752 /chrome | |
parent | 8b0336c1cd0a9875bcaeeef5045e5966d997a1bb (diff) | |
download | chromium_src-867e46d0a91880fdf7fbc5649f9028b73c2886ed.zip chromium_src-867e46d0a91880fdf7fbc5649f9028b73c2886ed.tar.gz chromium_src-867e46d0a91880fdf7fbc5649f9028b73c2886ed.tar.bz2 |
fix up small race on g_signal_socket
BUG=71695
TEST=BUILD
Review URL: http://codereview.chromium.org/6722032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79284 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/common/service_process_util_posix.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/common/service_process_util_posix.cc b/chrome/common/service_process_util_posix.cc index e15d1df..5592edf 100644 --- a/chrome/common/service_process_util_posix.cc +++ b/chrome/common/service_process_util_posix.cc @@ -59,6 +59,7 @@ ServiceProcessState::StateData::StateData() : set_action_(false) { } void ServiceProcessState::StateData::SignalReady() { + CHECK_EQ(g_signal_socket, -1); CHECK(MessageLoopForIO::current()->WatchFileDescriptor( sockets_[0], true, MessageLoopForIO::WATCH_READ, &watcher_, shut_down_monitor_.get())); @@ -104,6 +105,7 @@ ServiceProcessState::StateData::~StateData() { PLOG(ERROR) << "sigaction"; } } + g_signal_socket = -1; } void ServiceProcessState::CreateState() { @@ -120,7 +122,6 @@ void ServiceProcessState::CreateState() { bool ServiceProcessState::SignalReady( base::MessageLoopProxy* message_loop_proxy, Task* shutdown_task) { CHECK(state_); - CHECK_EQ(g_signal_socket, -1); scoped_ptr<Task> scoped_shutdown_task(shutdown_task); #if defined(OS_LINUX) @@ -141,7 +142,6 @@ bool ServiceProcessState::SignalReady( } void ServiceProcessState::TearDownState() { - g_signal_socket = -1; if (state_) { state_->Release(); state_ = NULL; |