From e185057ef963118790e53d99e97a3eaea1e49b22 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Thu, 7 Mar 2019 18:25:40 -0800 Subject: [PATCH] chore: fix linting issues in atom_api_cookies.cc --- atom/browser/api/atom_api_cookies.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/atom/browser/api/atom_api_cookies.cc b/atom/browser/api/atom_api_cookies.cc index 43fb36429db3..366db5a86e6f 100644 --- a/atom/browser/api/atom_api_cookies.cc +++ b/atom/browser/api/atom_api_cookies.cc @@ -220,11 +220,14 @@ void OnSetCookie(util::Promise promise, break; } if (errmsg.empty()) { - RunCallbackInUI( + base::PostTaskWithTraits( + FROM_HERE, {BrowserThread::UI}, base::BindOnce(util::Promise::ResolveEmptyPromise, std::move(promise))); } else { - RunCallbackInUI( - base::BindOnce(util::Promise::RejectPromise, std::move(promise), errmsg)); + base::PostTaskWithTraits( + FROM_HERE, {BrowserThread::UI}, + base::BindOnce(util::Promise::RejectPromise, std::move(promise), + std::move(errmsg))); } }