refactor: use private inheritance from mojo::MessageReceiver (#45973)

* refactor: make UtilityProcessWrapper inherit privately from mojo::MessageReceiver

* refactor: make ParentPort inherit privately from mojo::MessageReceiver

* refactor: make MessagePort inherit privately from mojo::MessageReceiver
This commit is contained in:
Charles Kerr 2025-03-12 13:06:41 -05:00 committed by GitHub
parent 5ce41bac8d
commit c813bc2a92
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -43,7 +43,7 @@ class UtilityProcessWrapper final
: public gin::Wrappable<UtilityProcessWrapper>, : public gin::Wrappable<UtilityProcessWrapper>,
public gin_helper::Pinnable<UtilityProcessWrapper>, public gin_helper::Pinnable<UtilityProcessWrapper>,
public gin_helper::EventEmitterMixin<UtilityProcessWrapper>, public gin_helper::EventEmitterMixin<UtilityProcessWrapper>,
public mojo::MessageReceiver, private mojo::MessageReceiver,
public node::mojom::NodeServiceClient, public node::mojom::NodeServiceClient,
public content::ServiceProcessHost::Observer { public content::ServiceProcessHost::Observer {
public: public:

View file

@ -29,7 +29,7 @@ namespace electron {
// A non-blink version of blink::MessagePort. // A non-blink version of blink::MessagePort.
class MessagePort final : public gin::Wrappable<MessagePort>, class MessagePort final : public gin::Wrappable<MessagePort>,
public gin_helper::CleanedUpAtExit, public gin_helper::CleanedUpAtExit,
public mojo::MessageReceiver { private mojo::MessageReceiver {
public: public:
~MessagePort() override; ~MessagePort() override;
static gin::Handle<MessagePort> Create(v8::Isolate* isolate); static gin::Handle<MessagePort> Create(v8::Isolate* isolate);

View file

@ -31,7 +31,7 @@ namespace electron {
// for the lifetime of a Utility Process which // for the lifetime of a Utility Process which
// also means that GC lifecycle is ignored by this class. // also means that GC lifecycle is ignored by this class.
class ParentPort final : public gin::Wrappable<ParentPort>, class ParentPort final : public gin::Wrappable<ParentPort>,
public mojo::MessageReceiver { private mojo::MessageReceiver {
public: public:
static ParentPort* GetInstance(); static ParentPort* GetInstance();
static gin::Handle<ParentPort> Create(v8::Isolate* isolate); static gin::Handle<ParentPort> Create(v8::Isolate* isolate);