Just use plain pointer for weak reference.

This commit is contained in:
Cheng Zhao 2014-09-25 20:38:12 +08:00
parent c95a93ef1c
commit 4006b6407c
10 changed files with 38 additions and 45 deletions

View file

@ -17,7 +17,7 @@ namespace asar {
URLRequestAsarJob::URLRequestAsarJob(
net::URLRequest* request,
net::NetworkDelegate* network_delegate,
const scoped_refptr<Archive>& archive,
Archive* archive,
const base::FilePath& file_path,
const scoped_refptr<base::TaskRunner>& file_task_runner)
: net::URLRequestJob(request, network_delegate),
@ -31,7 +31,7 @@ URLRequestAsarJob::URLRequestAsarJob(
URLRequestAsarJob::~URLRequestAsarJob() {}
void URLRequestAsarJob::Start() {
if (!archive_->GetFileInfo(file_path_, &file_info_)) {
if (!archive_ || !archive_->GetFileInfo(file_path_, &file_info_)) {
NotifyDone(net::URLRequestStatus(net::URLRequestStatus::FAILED,
net::ERR_FILE_NOT_FOUND));
return;