Commit 09c21aa9 authored by Marijn Kruisselbrink's avatar Marijn Kruisselbrink Committed by Commit Bot

Add missing null-check to BlobDataHandle::GetBlobStatus.

This method was dereferencing a weak pointer without first making sure
the pointer wasn't null, unlike every other method in the class. This
fixes that.

Bug: 790772
Change-Id: I980fa47a5afceae36d5843056ed03a88e863adce
Reviewed-on: https://chromium-review.googlesource.com/802762Reviewed-by: default avatarDaniel Murphy <dmurph@chromium.org>
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521297}
parent cf91f7bf
...@@ -95,6 +95,9 @@ bool BlobDataHandle::IsBroken() const { ...@@ -95,6 +95,9 @@ bool BlobDataHandle::IsBroken() const {
} }
BlobStatus BlobDataHandle::GetBlobStatus() const { BlobStatus BlobDataHandle::GetBlobStatus() const {
DCHECK(io_task_runner_->RunsTasksInCurrentSequence());
if (!shared_->context_)
return BlobStatus::ERR_REFERENCED_BLOB_BROKEN;
return shared_->context_->GetBlobStatus(shared_->uuid_); return shared_->context_->GetBlobStatus(shared_->uuid_);
} }
......
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