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

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

Issue 1337113004: CHECK that URLRequestJobs are not orphaned while blocked by extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « extensions/browser/api/web_request/web_request_api.h ('k') | net/base/layered_network_delegate.h » ('j') | 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 40b9db7ddf0c080438019823b180f00b6bd38c03..6b6513e0ec09352d2376ca5fe53c5fd9030ff3f3 100644
--- a/extensions/browser/api/web_request/web_request_api.cc
+++ b/extensions/browser/api/web_request/web_request_api.cc
@@ -1226,6 +1226,17 @@ void ExtensionWebRequestEventRouter::OnURLRequestDestroyed(
base::Time::Now());
}
+void ExtensionWebRequestEventRouter::OnURLRequestJobOrphaned(
+ void* browser_context,
+ const net::URLRequest* request) {
+ // See https://crbug.com/289715. While a URLRequest is blocking on an
+ // extension, it may not orphan jobs unless OnURLRequestDestroyed is called
+ // first.
+ //
+ // TODO(davidben): Remove this when the crash has been diagnosed.
+ CHECK_EQ(0u, blocked_requests_.count(request->identifier()));
mmenke 2015/09/14 15:18:27 Maybe toss the URL on the stack? One of the possi
davidben 2015/09/14 19:55:55 Done.
+}
+
void ExtensionWebRequestEventRouter::ClearPendingCallbacks(
const net::URLRequest* request) {
blocked_requests_.erase(request->identifier());
« no previous file with comments | « extensions/browser/api/web_request/web_request_api.h ('k') | net/base/layered_network_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698