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

Unified Diff: content/browser/frame_host/navigation_handle_impl.cc

Issue 2973063002: Make sure NavigationHandleImpl::WillStartRequest only executes once (Closed)
Patch Set: Created 3 years, 5 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: content/browser/frame_host/navigation_handle_impl.cc
diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc
index 9e6c1fc1bd3e8a03ad3babb122673881e34a2ad4..4f024e887254fe4a23cbcc25cc955ddb79c04f2c 100644
--- a/content/browser/frame_host/navigation_handle_impl.cc
+++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -570,6 +570,13 @@ void NavigationHandleImpl::WillStartRequest(
const ThrottleChecksFinishedCallback& callback) {
TRACE_EVENT_ASYNC_STEP_INTO0("navigation", "NavigationHandle", this,
"WillStartRequest");
+ // WillStartRequest should only be called once.
+ if (state_ != INITIAL) {
+ state_ = CANCELING;
+ RunCompleteCallback(NavigationThrottle::CANCEL);
+ return;
+ }
+
if (method != "POST")
DCHECK(!resource_request_body);
« 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