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() {
|
void Browser::DidFinishLaunching() {
|
||||||
is_ready_ = true;
|
is_ready_ = true;
|
||||||
process_singleton_->Unlock();
|
|
||||||
|
if (process_notify_callback_set_) {
|
||||||
|
process_singleton_->Unlock();
|
||||||
|
}
|
||||||
|
|
||||||
FOR_EACH_OBSERVER(BrowserObserver, observers_, OnFinishLaunching());
|
FOR_EACH_OBSERVER(BrowserObserver, observers_, OnFinishLaunching());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,7 +148,10 @@ void Browser::NotifyAndShutdown() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
process_singleton_->Cleanup();
|
if (process_notify_callback_set_) {
|
||||||
|
process_singleton_->Cleanup();
|
||||||
|
}
|
||||||
|
|
||||||
Shutdown();
|
Shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,6 +174,10 @@ void Browser::InitializeSingleInstance() {
|
||||||
base::Bind(&Browser::OnProcessSingletonNotification, no_refcount_this)));
|
base::Bind(&Browser::OnProcessSingletonNotification, no_refcount_this)));
|
||||||
|
|
||||||
process_notify_result_ = process_singleton_->NotifyOtherProcessOrCreate();
|
process_notify_result_ = process_singleton_->NotifyOtherProcessOrCreate();
|
||||||
|
|
||||||
|
if (is_ready_) {
|
||||||
|
process_singleton_->Unlock();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ProcessSingleton::NotifyResult Browser::GetSingleInstanceResult() {
|
ProcessSingleton::NotifyResult Browser::GetSingleInstanceResult() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue