New issue
Advanced search Search tips

Issue 854716 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

HttpCache::GetBackend and disk_cache::CreateCacheBackend are hard to use.

Project Member Reported by morlovich@chromium.org, Jun 20 2018

Issue description

Both of are the net-style maybe-sync/maybe-async methods that require the caller to carefully manage the storage where the pointer gets written to.

It may be worthwhile to change their signatures; to perhaps take something like a OnceCallback<int, Backend*> and a OnceCallback<int, std::unique_ptr<Backend>>.

They could either guarantee to always be async, or clearly document that a re-entrant sync return can happen. 

 

Sign in to add a comment