diff --git a/atom/browser/net/asar/url_request_asar_job.cc b/atom/browser/net/asar/url_request_asar_job.cc index 8bacf1124bf6..ad02ed620d6d 100644 --- a/atom/browser/net/asar/url_request_asar_job.cc +++ b/atom/browser/net/asar/url_request_asar_job.cc @@ -15,6 +15,7 @@ #include "base/strings/string_util.h" #include "base/synchronization/lock.h" #include "base/task_runner.h" +#include "base/threading/thread_task_runner_handle.h" #include "net/base/file_stream.h" #include "net/base/filename_util.h" #include "net/base/io_buffer.h" @@ -119,8 +120,11 @@ void URLRequestAsarJob::Start() { weak_ptr_factory_.GetWeakPtr(), base::Owned(meta_info))); } else { - NotifyStartError(net::URLRequestStatus(net::URLRequestStatus::FAILED, - net::ERR_FILE_NOT_FOUND)); + base::ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, + base::Bind(&URLRequestAsarJob::DidOpen, + weak_ptr_factory_.GetWeakPtr(), + net::ERR_FILE_NOT_FOUND)); } } diff --git a/atom/browser/net/asar/url_request_asar_job.h b/atom/browser/net/asar/url_request_asar_job.h index 9808be88189e..149faed6c5be 100644 --- a/atom/browser/net/asar/url_request_asar_job.h +++ b/atom/browser/net/asar/url_request_asar_job.h @@ -89,7 +89,6 @@ class URLRequestAsarJob : public net::URLRequestJob { // Callback after fetching file info on a background thread. void DidFetchMetaInfo(const FileMetaInfo* meta_info); - // Callback after opening file on a background thread. void DidOpen(int result);