fix: do not increase ref-counting in wrong thread (#16738)
This commit is contained in:
parent
ff461d9d26
commit
d53b51607c
1 changed files with 2 additions and 2 deletions
|
@ -195,7 +195,7 @@ void RemoveCookieOnIO(scoped_refptr<net::URLRequestContextGetter> getter,
|
||||||
const std::string& name,
|
const std::string& name,
|
||||||
scoped_refptr<util::Promise> promise) {
|
scoped_refptr<util::Promise> promise) {
|
||||||
GetCookieStore(getter)->DeleteCookieAsync(
|
GetCookieStore(getter)->DeleteCookieAsync(
|
||||||
url, name, base::BindOnce(ResolvePromiseInUI, promise));
|
url, name, base::BindOnce(ResolvePromiseInUI, std::move(promise)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resolves/rejects the |promise| in UI thread.
|
// Resolves/rejects the |promise| in UI thread.
|
||||||
|
@ -219,7 +219,7 @@ void FlushCookieStoreOnIOThread(
|
||||||
scoped_refptr<net::URLRequestContextGetter> getter,
|
scoped_refptr<net::URLRequestContextGetter> getter,
|
||||||
scoped_refptr<util::Promise> promise) {
|
scoped_refptr<util::Promise> promise) {
|
||||||
GetCookieStore(getter)->FlushStore(
|
GetCookieStore(getter)->FlushStore(
|
||||||
base::BindOnce(ResolvePromiseInUI, promise));
|
base::BindOnce(ResolvePromiseInUI, std::move(promise)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets cookie with |details| in IO thread.
|
// Sets cookie with |details| in IO thread.
|
||||||
|
|
Loading…
Reference in a new issue