From 6c251da2011d8f27d843f46d177db31701d7c104 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Mon, 5 Jul 2021 12:45:50 -0700 Subject: [PATCH] chore: correct spelling of is_quitting in electron::Browser (#29948) --- shell/browser/browser.cc | 18 +++++++++--------- shell/browser/browser.h | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/shell/browser/browser.cc b/shell/browser/browser.cc index 5e8ff927e5c5..dbd23d4b3cb0 100644 --- a/shell/browser/browser.cc +++ b/shell/browser/browser.cc @@ -78,11 +78,11 @@ void Browser::Focus(gin::Arguments* args) { #endif void Browser::Quit() { - if (is_quiting_) + if (is_quitting_) return; - is_quiting_ = HandleBeforeQuit(); - if (!is_quiting_) + is_quitting_ = HandleBeforeQuit(); + if (!is_quitting_) return; if (electron::WindowList::IsEmpty()) @@ -100,7 +100,7 @@ void Browser::Exit(gin::Arguments* args) { exit(code); } else { // 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. is_exiting_ = true; @@ -121,7 +121,7 @@ void Browser::Shutdown() { return; is_shutdown_ = true; - is_quiting_ = true; + is_quitting_ = true; for (BrowserObserver& observer : observers_) observer.OnQuit(); @@ -242,7 +242,7 @@ void Browser::NotifyAndShutdown() { observer.OnWillQuit(&prevent_default); if (prevent_default) { - is_quiting_ = false; + is_quitting_ = false; return; } @@ -258,16 +258,16 @@ bool Browser::HandleBeforeQuit() { } void Browser::OnWindowCloseCancelled(NativeWindow* window) { - if (is_quiting_) + if (is_quitting_) // Once a beforeunload handler has prevented the closing, we think the quit // is cancelled too. - is_quiting_ = false; + is_quitting_ = false; } void Browser::OnWindowAllClosed() { if (is_exiting_) { Shutdown(); - } else if (is_quiting_) { + } else if (is_quitting_) { NotifyAndShutdown(); } else { for (BrowserObserver& observer : observers_) diff --git a/shell/browser/browser.h b/shell/browser/browser.h index 3b57855255c2..187690261132 100755 --- a/shell/browser/browser.h +++ b/shell/browser/browser.h @@ -305,7 +305,7 @@ class Browser : public WindowListObserver { #endif 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_; } v8::Local WhenReady(v8::Isolate* isolate); @@ -322,7 +322,7 @@ class Browser : public WindowListObserver { // Send the before-quit message and start closing windows. bool HandleBeforeQuit(); - bool is_quiting_ = false; + bool is_quitting_ = false; private: // WindowListObserver implementations: