Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2335)

Unified Diff: chrome/browser/extensions/lazy_background_task_queue.cc

Issue 23537019: Don't try to load an event page to fire an event if the browser is shutting down. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/lazy_background_task_queue.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/lazy_background_task_queue.cc
diff --git a/chrome/browser/extensions/lazy_background_task_queue.cc b/chrome/browser/extensions/lazy_background_task_queue.cc
index 7df7779c3e9e68bddb191c20a3074d8ecfc12771..0d13a93dde6646e5b571158a595cf787d96a9665 100644
--- a/chrome/browser/extensions/lazy_background_task_queue.cc
+++ b/chrome/browser/extensions/lazy_background_task_queue.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/extensions/lazy_background_task_queue.h"
#include "base/callback.h"
+#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/extensions/extension_host.h"
#include "chrome/browser/extensions/extension_process_manager.h"
@@ -58,6 +59,10 @@ void LazyBackgroundTaskQueue::AddPendingTask(
Profile* profile,
const std::string& extension_id,
const PendingTask& task) {
+ if (g_browser_process->IsShuttingDown()) {
+ task.Run(NULL);
+ return;
+ }
PendingTasksList* tasks_list = NULL;
PendingTasksKey key(profile, extension_id);
PendingTasksMap::iterator it = pending_tasks_.find(key);
« no previous file with comments | « chrome/browser/extensions/lazy_background_task_queue.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698