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

Unified Diff: chrome/browser/extensions/api/identity/web_auth_flow.cc

Issue 2366953002: Fix WebAuthFlow crash of dereferencing nullptr navigation_handle->GetResponseHeaders(). (Closed)
Patch Set: Created 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/identity/web_auth_flow.cc
diff --git a/chrome/browser/extensions/api/identity/web_auth_flow.cc b/chrome/browser/extensions/api/identity/web_auth_flow.cc
index 663f17437b53157892c60bc96debf8a5eb6e0924..c6c84168512b9e6464435389028b7075638c6c1a 100644
--- a/chrome/browser/extensions/api/identity/web_auth_flow.cc
+++ b/chrome/browser/extensions/api/identity/web_auth_flow.cc
@@ -212,6 +212,7 @@ void WebAuthFlow::DidFinishNavigation(
"DidFinishNavigationFailure", "error_code",
navigation_handle->GetNetErrorCode());
} else if (navigation_handle->IsInMainFrame() &&
+ navigation_handle->GetResponseHeaders() &&
navigation_handle->GetResponseHeaders()->response_code() >= 400) {
failed = true;
TRACE_EVENT_ASYNC_STEP_PAST1(
« 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