Refactor as per @zcbenz comments
Also fix issue where we run the single instance callback *not* on the UI thread, this apparently results in a hung process.
This commit is contained in:
parent
ecbeb0d117
commit
0ab83b301d
7 changed files with 22 additions and 16 deletions
|
@ -1048,10 +1048,9 @@ bool ProcessSingleton::Create() {
|
|||
if (listen(sock, 5) < 0)
|
||||
NOTREACHED() << "listen failed: " << base::safe_strerror(errno);
|
||||
|
||||
DCHECK(BrowserThread::IsMessageLoopValid(BrowserThread::IO));
|
||||
sock_ = sock;
|
||||
|
||||
if (atom::Browser::Get()->is_ready()) {
|
||||
|
||||
if (BrowserThread::IsMessageLoopValid(BrowserThread::IO)) {
|
||||
StartListeningOnSocket();
|
||||
} else {
|
||||
listen_on_ready_ = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue