mirror of
https://github.com/electron/electron.git
synced 2026-01-25 23:38:18 -05:00
Since setting up process_singleton is now conditional, its cleanup / unlock must be too
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user