Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Unified Diff: content/browser/service_worker/service_worker_context_wrapper.cc

Issue 1693303002: ServiceWorker: Make ServiceWorkerStorage more self-defensive (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/service_worker/service_worker_context_wrapper.cc
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
index 4c39f93381e51a8aa1d753b73ff802afe2887ca5..280cc29bffa4727febeaed83c7a677891ac74cce 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
@@ -309,6 +309,7 @@ void ServiceWorkerContextWrapper::GetAllOriginsInfo(
void ServiceWorkerContextWrapper::DidGetAllRegistrationsForGetAllOrigins(
const GetUsageInfoCallback& callback,
+ ServiceWorkerStatusCode status,
const std::vector<ServiceWorkerRegistrationInfo>& registrations) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
std::vector<ServiceWorkerUsageInfo> usage_infos;
@@ -574,7 +575,8 @@ void ServiceWorkerContextWrapper::GetAllRegistrations(
const GetRegistrationsInfosCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (!context_core_) {
- RunSoon(base::Bind(callback, std::vector<ServiceWorkerRegistrationInfo>()));
+ RunSoon(base::Bind(callback, SERVICE_WORKER_ERROR_ABORT,
+ std::vector<ServiceWorkerRegistrationInfo>()));
return;
}
context_core_->storage()->GetAllRegistrationsInfos(callback);

Powered by Google App Engine
This is Rietveld 408576698