refactor: allocate api::Session on cpp heap (#48141)

This commit is contained in:
Robo 2025-08-25 18:52:06 +09:00 committed by GitHub
commit 3ccb1bc0a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 632 additions and 293 deletions

View file

@ -18,6 +18,11 @@ namespace content {
class RenderFrameHost;
}
namespace gin {
template <typename T>
class WeakCell;
} // namespace gin
namespace electron {
class ElectronApiIPCHandlerImpl : public mojom::ElectronApiIPC,
private content::WebContentsObserver {
@ -65,7 +70,7 @@ class ElectronApiIPCHandlerImpl : public mojom::ElectronApiIPC,
void OnConnectionError();
content::RenderFrameHost* GetRenderFrameHost();
api::Session* GetSession();
gin::WeakCell<api::Session>* GetSession();
gin_helper::Handle<gin_helper::internal::Event> MakeIPCEvent(
v8::Isolate* isolate,