Commit db31c228 authored by kapishnikov's avatar kapishnikov Committed by Commit Bot

Add ClientSocketHandle NULL CHECK in HttpStreamParser constructor

BUG=790776

Change-Id: I445eb3ef0dc957342ef2afc62fed3c51b06f893a
Reviewed-on: https://chromium-review.googlesource.com/804059Reviewed-by: default avatarHelen Li <xunjieli@chromium.org>
Commit-Queue: Helen Li <xunjieli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521113}
parent a727df3f
......@@ -24,7 +24,10 @@ HttpBasicState::HttpBasicState(std::unique_ptr<ClientSocketHandle> connection,
connection_(std::move(connection)),
using_proxy_(using_proxy),
http_09_on_non_default_ports_enabled_(
http_09_on_non_default_ports_enabled) {}
http_09_on_non_default_ports_enabled) {
CHECK(connection_) << "ClientSocketHandle passed to HttpBasicState must "
"not be NULL. See crbug.com/790776";
}
HttpBasicState::~HttpBasicState() = default;
......
......@@ -207,6 +207,8 @@ HttpStreamParser::HttpStreamParser(ClientSocketHandle* connection,
sent_last_chunk_(false),
upload_error_(OK),
weak_ptr_factory_(this) {
CHECK(connection_) << "ClientSocketHandle passed to HttpStreamParser must "
"not be NULL. See crbug.com/790776";
io_callback_ = base::Bind(&HttpStreamParser::OnIOComplete,
weak_ptr_factory_.GetWeakPtr());
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment