fix: notify request context shutdown on IO before cleanup (#14092)
This commit is contained in:
parent
d1886c5d22
commit
4c7af6a429
22 changed files with 504 additions and 387 deletions
|
@ -5,6 +5,7 @@
|
|||
#include "atom/browser/api/atom_api_cookies.h"
|
||||
|
||||
#include "atom/browser/atom_browser_context.h"
|
||||
#include "atom/browser/request_context_delegate.h"
|
||||
#include "atom/common/native_mate_converters/callback.h"
|
||||
#include "atom/common/native_mate_converters/gurl_converter.h"
|
||||
#include "atom/common/native_mate_converters/value_converter.h"
|
||||
|
@ -253,9 +254,10 @@ void SetCookieOnIO(scoped_refptr<net::URLRequestContextGetter> getter,
|
|||
Cookies::Cookies(v8::Isolate* isolate, AtomBrowserContext* browser_context)
|
||||
: browser_context_(browser_context) {
|
||||
Init(isolate);
|
||||
auto subscription = browser_context->RegisterCookieChangeCallback(
|
||||
base::Bind(&Cookies::OnCookieChanged, base::Unretained(this)));
|
||||
browser_context->set_cookie_change_subscription(std::move(subscription));
|
||||
cookie_change_subscription_ =
|
||||
browser_context->GetRequestContextDelegate()
|
||||
->RegisterCookieChangeCallback(
|
||||
base::Bind(&Cookies::OnCookieChanged, base::Unretained(this)));
|
||||
}
|
||||
|
||||
Cookies::~Cookies() {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue