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

Unified Diff: extensions/browser/api/web_request/web_request_api.cc

Issue 2484353002: Unflake AppViewTest.TestAppViewGoodDataShouldSucceed under UBSan Vptr. (Closed)
Patch Set: Add || Created 4 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/web_request/web_request_api.cc
diff --git a/extensions/browser/api/web_request/web_request_api.cc b/extensions/browser/api/web_request/web_request_api.cc
index 12f38e1e7588732455c16edd6b14b03d24d4b813..8071003b9d416aff4a365fbc3b53ddbd6a3a5e63 100644
--- a/extensions/browser/api/web_request/web_request_api.cc
+++ b/extensions/browser/api/web_request/web_request_api.cc
@@ -967,8 +967,13 @@ void ExtensionWebRequestEventRouter::OnErrorOccurred(
net::URLRequest* request,
bool started,
int net_error) {
+ ExtensionsBrowserClient* client = ExtensionsBrowserClient::Get();
+ if (!client) {
+ // |client| could be NULL during shutdown.
+ return;
+ }
ExtensionNavigationUIData* navigation_ui_data =
- ExtensionsBrowserClient::Get()->GetExtensionNavigationUIData(request);
+ client->GetExtensionNavigationUIData(request);
// We hide events from the system context as well as sensitive requests.
// However, if the request first became sensitive after redirecting we have
// already signaled it and thus we have to signal the end of it. This is
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698