Skip to content

Commit

Permalink
fix: do not increase ref-counting in wrong thread (#16738)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheng Zhao committed Feb 6, 2019
1 parent ff461d9 commit d53b516
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions atom/browser/api/atom_api_cookies.cc
Expand Up @@ -195,7 +195,7 @@ void RemoveCookieOnIO(scoped_refptr<net::URLRequestContextGetter> getter,
const std::string& name,
scoped_refptr<util::Promise> promise) {
GetCookieStore(getter)->DeleteCookieAsync(
url, name, base::BindOnce(ResolvePromiseInUI, promise));
url, name, base::BindOnce(ResolvePromiseInUI, std::move(promise)));
}

// Resolves/rejects the |promise| in UI thread.
Expand All @@ -219,7 +219,7 @@ void FlushCookieStoreOnIOThread(
scoped_refptr<net::URLRequestContextGetter> getter,
scoped_refptr<util::Promise> promise) {
GetCookieStore(getter)->FlushStore(
base::BindOnce(ResolvePromiseInUI, promise));
base::BindOnce(ResolvePromiseInUI, std::move(promise)));
}

// Sets cookie with |details| in IO thread.
Expand Down

0 comments on commit d53b516

Please sign in to comment.