Chromium Code Reviews| Index: chrome/browser/extensions/chrome_extension_function.cc |
| diff --git a/chrome/browser/extensions/chrome_extension_function.cc b/chrome/browser/extensions/chrome_extension_function.cc |
| index 07c3006d98fb9fc4ef3dbebc71d3783fb0ab1e5a..5dab504dce511377347e9006a6598d170274ffad 100644 |
| --- a/chrome/browser/extensions/chrome_extension_function.cc |
| +++ b/chrome/browser/extensions/chrome_extension_function.cc |
| @@ -6,6 +6,7 @@ |
| #include <utility> |
| +#include "chrome/browser/browser_process.h" |
| #include "chrome/browser/extensions/chrome_extension_function_details.h" |
| #include "chrome/browser/extensions/window_controller.h" |
| #include "chrome/browser/extensions/window_controller_list.h" |
| @@ -100,6 +101,11 @@ ChromeAsyncExtensionFunction::ChromeAsyncExtensionFunction() { |
| ChromeAsyncExtensionFunction::~ChromeAsyncExtensionFunction() {} |
| ExtensionFunction::ResponseAction ChromeAsyncExtensionFunction::Run() { |
| + if (g_browser_process->IsShuttingDown()) { |
| + error_ = "Shutting down."; |
| + return RespondNow(Error(error_)); |
|
Peter Beverloo
2016/07/05 12:42:10
Is this potentially developer-visible at this poin
Devlin
2016/07/06 16:54:23
ChromeAsyncExtensionFunction is just one of many E
dgn
2016/07/07 15:20:17
Thanks for the explanation. I'm not too keen on st
Devlin
2016/07/08 01:01:01
If this solves the immediate problem, we can avoid
dgn
2016/07/12 15:58:19
Done. I could not make the check in ExtensionFunct
Devlin
2016/07/12 16:19:38
Instead you can use ExtensionsBrowserClient. We d
dgn
2016/07/13 20:15:08
Oh wow it makes it much simpler indeed. Thanks! I'
|
| + } |
| + |
| return RunAsync() ? RespondLater() : RespondNow(Error(error_)); |
| } |