Use a weakptr on the URLRequestHttpJob::OnHeadersReceivedCallback callback.

Although this doesn't protect the out-params passed to
NotifyHeadersReceived, it does prevent a case where the
URLRequestHttpJob tries to access a null transaction_ if the callback is
called immediately after the job is killed but before it is destroyed.

Bug: 934588
Change-Id: I6d92e30e311e820d99dac3b438274ecd43fe544b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1520215
Reviewed-by: Matt Menke <mmenke@chromium.org>
Commit-Queue: Matt Mueller <mattm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#641297}
2 files changed