Commit 76f94b41 authored by rkc@chromium.org's avatar rkc@chromium.org

Handle browser shutdown better in KioskModeScreensaver.

If the browser process is shutting down, we don't need to do any of the cleanup in ~KioskModeScreensaver since the extension itself is only written to the temp dir and all other browser internals that we are resetting are irrelevant at this point. So if the browser is shutting down, don't do anything in the destructor.

R=skuhne@chromium.org
BUG=288216

Review URL: https://chromiumcodereview.appspot.com/23868032

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223570 0039d316-1c4b-4281-b951-d872f2087c98
parent 36cf37d8
......@@ -165,6 +165,11 @@ KioskModeScreensaver::KioskModeScreensaver()
}
KioskModeScreensaver::~KioskModeScreensaver() {
// If we are shutting down the system might already be gone and we shouldn't
// do anything (see crbug.com/288216).
if (!g_browser_process || g_browser_process->IsShuttingDown())
return;
// If the extension was unpacked.
if (!extension_base_path_.empty()) {
ExtensionService* service = GetDefaultExtensionService();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment