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

Unified Diff: content/browser/loader/mime_sniffing_resource_handler.cc

Issue 2626663002: Update MimeSniffingResourceHandler tests to use MockResourceLoader. (Closed)
Patch Set: Merge Created 3 years, 11 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 | content/browser/loader/mime_sniffing_resource_handler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/mime_sniffing_resource_handler.cc
diff --git a/content/browser/loader/mime_sniffing_resource_handler.cc b/content/browser/loader/mime_sniffing_resource_handler.cc
index 111e3f69ddf970f8245d43d9b3836cdfad835257..6c13e04700392ec80d311c06462fff2397f3d22e 100644
--- a/content/browser/loader/mime_sniffing_resource_handler.cc
+++ b/content/browser/loader/mime_sniffing_resource_handler.cc
@@ -245,8 +245,11 @@ void MimeSniffingResourceHandler::Resume() {
}
// Otherwise proceed with the replay of the response. If it is successful,
- // it will resume the request.
- AdvanceState();
+ // it will resume the request. Posted as a task to avoid re-entrancy into
+ // the calling class.
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&MimeSniffingResourceHandler::AdvanceState,
+ weak_ptr_factory_.GetWeakPtr()));
}
void MimeSniffingResourceHandler::Cancel() {
« no previous file with comments | « no previous file | content/browser/loader/mime_sniffing_resource_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698