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

@ -19,6 +19,11 @@ namespace content {
class RenderProcessHost;
}
namespace gin {
template <typename T>
class WeakCell;
} // namespace gin
namespace electron {
class ElectronBrowserContext;
@ -68,7 +73,7 @@ class ElectronApiSWIPCHandlerImpl : public mojom::ElectronApiIPC,
private:
ElectronBrowserContext* GetBrowserContext();
api::Session* GetSession();
gin::WeakCell<api::Session>* GetSession();
gin_helper::Handle<gin_helper::internal::Event> MakeIPCEvent(
v8::Isolate* isolate,