Index: extensions/browser/extension_function.cc |
diff --git a/extensions/browser/extension_function.cc b/extensions/browser/extension_function.cc |
index 8f737df200df1c93f460422afb50ebb1464137aa..49a005bf93f39ce8f7b50488e846c499cfbffbf3 100644 |
--- a/extensions/browser/extension_function.cc |
+++ b/extensions/browser/extension_function.cc |
@@ -478,8 +478,10 @@ UIThreadExtensionFunction::~UIThreadExtensionFunction() { |
// shutting down. |
// TODO(devlin): Duplicate this check in IOThreadExtensionFunction. It's |
// tricky because checking IsShuttingDown has to be called from the UI thread. |
- DCHECK(extensions::ExtensionsBrowserClient::Get()->IsShuttingDown() || |
- did_respond_ || ignore_all_did_respond_for_testing_do_not_use) |
+ extensions::ExtensionsBrowserClient* browser_client = |
+ extensions::ExtensionsBrowserClient::Get(); |
+ DCHECK(!browser_client || browser_client->IsShuttingDown() || did_respond_ || |
+ ignore_all_did_respond_for_testing_do_not_use) |
<< name_; |
} |