chore: correct spelling of is_quitting in electron::Browser (#29948)
This commit is contained in:
parent
60366ad171
commit
6c251da201
2 changed files with 11 additions and 11 deletions
|
@ -78,11 +78,11 @@ void Browser::Focus(gin::Arguments* args) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void Browser::Quit() {
|
void Browser::Quit() {
|
||||||
if (is_quiting_)
|
if (is_quitting_)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
is_quiting_ = HandleBeforeQuit();
|
is_quitting_ = HandleBeforeQuit();
|
||||||
if (!is_quiting_)
|
if (!is_quitting_)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (electron::WindowList::IsEmpty())
|
if (electron::WindowList::IsEmpty())
|
||||||
|
@ -100,7 +100,7 @@ void Browser::Exit(gin::Arguments* args) {
|
||||||
exit(code);
|
exit(code);
|
||||||
} else {
|
} else {
|
||||||
// Prepare to quit when all windows have been closed.
|
// Prepare to quit when all windows have been closed.
|
||||||
is_quiting_ = true;
|
is_quitting_ = true;
|
||||||
|
|
||||||
// Remember this caller so that we don't emit unrelated events.
|
// Remember this caller so that we don't emit unrelated events.
|
||||||
is_exiting_ = true;
|
is_exiting_ = true;
|
||||||
|
@ -121,7 +121,7 @@ void Browser::Shutdown() {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
is_shutdown_ = true;
|
is_shutdown_ = true;
|
||||||
is_quiting_ = true;
|
is_quitting_ = true;
|
||||||
|
|
||||||
for (BrowserObserver& observer : observers_)
|
for (BrowserObserver& observer : observers_)
|
||||||
observer.OnQuit();
|
observer.OnQuit();
|
||||||
|
@ -242,7 +242,7 @@ void Browser::NotifyAndShutdown() {
|
||||||
observer.OnWillQuit(&prevent_default);
|
observer.OnWillQuit(&prevent_default);
|
||||||
|
|
||||||
if (prevent_default) {
|
if (prevent_default) {
|
||||||
is_quiting_ = false;
|
is_quitting_ = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -258,16 +258,16 @@ bool Browser::HandleBeforeQuit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Browser::OnWindowCloseCancelled(NativeWindow* window) {
|
void Browser::OnWindowCloseCancelled(NativeWindow* window) {
|
||||||
if (is_quiting_)
|
if (is_quitting_)
|
||||||
// Once a beforeunload handler has prevented the closing, we think the quit
|
// Once a beforeunload handler has prevented the closing, we think the quit
|
||||||
// is cancelled too.
|
// is cancelled too.
|
||||||
is_quiting_ = false;
|
is_quitting_ = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Browser::OnWindowAllClosed() {
|
void Browser::OnWindowAllClosed() {
|
||||||
if (is_exiting_) {
|
if (is_exiting_) {
|
||||||
Shutdown();
|
Shutdown();
|
||||||
} else if (is_quiting_) {
|
} else if (is_quitting_) {
|
||||||
NotifyAndShutdown();
|
NotifyAndShutdown();
|
||||||
} else {
|
} else {
|
||||||
for (BrowserObserver& observer : observers_)
|
for (BrowserObserver& observer : observers_)
|
||||||
|
|
|
@ -305,7 +305,7 @@ class Browser : public WindowListObserver {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool is_shutting_down() const { return is_shutdown_; }
|
bool is_shutting_down() const { return is_shutdown_; }
|
||||||
bool is_quiting() const { return is_quiting_; }
|
bool is_quitting() const { return is_quitting_; }
|
||||||
bool is_ready() const { return is_ready_; }
|
bool is_ready() const { return is_ready_; }
|
||||||
v8::Local<v8::Value> WhenReady(v8::Isolate* isolate);
|
v8::Local<v8::Value> WhenReady(v8::Isolate* isolate);
|
||||||
|
|
||||||
|
@ -322,7 +322,7 @@ class Browser : public WindowListObserver {
|
||||||
// Send the before-quit message and start closing windows.
|
// Send the before-quit message and start closing windows.
|
||||||
bool HandleBeforeQuit();
|
bool HandleBeforeQuit();
|
||||||
|
|
||||||
bool is_quiting_ = false;
|
bool is_quitting_ = false;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// WindowListObserver implementations:
|
// WindowListObserver implementations:
|
||||||
|
|
Loading…
Reference in a new issue