refactor: allocate api::Session on cpp heap (#48141)
This commit is contained in:
parent
0917ed5f6f
commit
3ccb1bc0a8
32 changed files with 632 additions and 293 deletions
|
@ -31,9 +31,10 @@ void NetworkHintsHandlerImpl::Preconnect(const url::SchemeHostPort& url,
|
|||
if (!browser_context_) {
|
||||
return;
|
||||
}
|
||||
auto* session = electron::api::Session::FromBrowserContext(browser_context_);
|
||||
if (session) {
|
||||
session->Emit("preconnect", url.GetURL(), allow_credentials);
|
||||
gin::WeakCell<electron::api::Session>* session =
|
||||
electron::api::Session::FromBrowserContext(browser_context_);
|
||||
if (session && session->Get()) {
|
||||
session->Get()->Emit("preconnect", url.GetURL(), allow_credentials);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue