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-by: Matt Menke <>
Commit-Queue: Matt Mueller <>
Cr-Commit-Position: refs/heads/master@{#641297}
2 files changed