Since setting up process_singleton is now conditional, its cleanup / unlock must be too
This commit is contained in:
parent
15f00db1bf
commit
e5094fff3e
1 changed files with 13 additions and 2 deletions
|
@ -117,7 +117,11 @@ void Browser::WillFinishLaunching() {
|
|||
|
||||
void Browser::DidFinishLaunching() {
|
||||
is_ready_ = true;
|
||||
process_singleton_->Unlock();
|
||||
|
||||
if (process_notify_callback_set_) {
|
||||
process_singleton_->Unlock();
|
||||
}
|
||||
|
||||
FOR_EACH_OBSERVER(BrowserObserver, observers_, OnFinishLaunching());
|
||||
}
|
||||
|
||||
|
@ -144,7 +148,10 @@ void Browser::NotifyAndShutdown() {
|
|||
return;
|
||||
}
|
||||
|
||||
process_singleton_->Cleanup();
|
||||
if (process_notify_callback_set_) {
|
||||
process_singleton_->Cleanup();
|
||||
}
|
||||
|
||||
Shutdown();
|
||||
}
|
||||
|
||||
|
@ -167,6 +174,10 @@ void Browser::InitializeSingleInstance() {
|
|||
base::Bind(&Browser::OnProcessSingletonNotification, no_refcount_this)));
|
||||
|
||||
process_notify_result_ = process_singleton_->NotifyOtherProcessOrCreate();
|
||||
|
||||
if (is_ready_) {
|
||||
process_singleton_->Unlock();
|
||||
}
|
||||
}
|
||||
|
||||
ProcessSingleton::NotifyResult Browser::GetSingleInstanceResult() {
|
||||
|
|
Loading…
Reference in a new issue