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

Unified Diff: content/child/resource_dispatcher.cc

Issue 2390293002: Fix a null ptr crash on a empty body response on mojo loading (Closed)
Patch Set: Created 4 years, 2 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/child/resource_dispatcher.cc
diff --git a/content/child/resource_dispatcher.cc b/content/child/resource_dispatcher.cc
index aa413aeb97706540315d10f869a9a418683dffde..cd26a3b38c2532ea853a23c5add1cb9ac68a0060 100644
--- a/content/child/resource_dispatcher.cc
+++ b/content/child/resource_dispatcher.cc
@@ -101,6 +101,11 @@ class URLLoaderClientImpl final : public mojom::URLLoaderClient {
}
void OnComplete(const ResourceRequestCompletionStatus& status) override {
+ if (!body_consumer_) {
+ resource_dispatcher_->OnMessageReceived(
+ ResourceMsg_RequestComplete(request_id_, status));
+ return;
+ }
body_consumer_->OnComplete(status);
}
« 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