mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 15:25:52 +00:00
0f01791ffc
For cases where the class has direct calls (that is, we cast `this` to the subclass before making the call) no longer declare Recv/Answer methods on the base class at all. This should ensure that slots for them are not generated in vtables, and also allow the derived class to choose the method signature (e.g. whether it wants to take something by reference or by value). Differential Revision: https://phabricator.services.mozilla.com/D18132 --HG-- extra : moz-landing-system : lando
73 lines
2.5 KiB
C++
73 lines
2.5 KiB
C++
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#ifndef mozilla_net_SocketProcessParent_h
|
|
#define mozilla_net_SocketProcessParent_h
|
|
|
|
#include "mozilla/UniquePtr.h"
|
|
#include "mozilla/net/PSocketProcessParent.h"
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
class MemoryReport;
|
|
class MemoryReportRequestHost;
|
|
} // namespace dom
|
|
|
|
namespace ipc {
|
|
class CrashReporterHost;
|
|
} // namespace ipc
|
|
|
|
namespace net {
|
|
|
|
class SocketProcessHost;
|
|
|
|
// IPC actor of socket process in parent process. This is allocated and managed
|
|
// by SocketProcessHost.
|
|
class SocketProcessParent final : public PSocketProcessParent {
|
|
public:
|
|
friend class SocketProcessHost;
|
|
|
|
explicit SocketProcessParent(SocketProcessHost* aHost);
|
|
~SocketProcessParent();
|
|
|
|
static SocketProcessParent* GetSingleton();
|
|
|
|
mozilla::ipc::IPCResult RecvInitCrashReporter(
|
|
Shmem&& aShmem, const NativeThreadId& aThreadId);
|
|
mozilla::ipc::IPCResult RecvAddMemoryReport(const MemoryReport& aReport);
|
|
mozilla::ipc::IPCResult RecvFinishMemoryReport(const uint32_t& aGeneration);
|
|
mozilla::ipc::IPCResult RecvAccumulateChildHistograms(
|
|
InfallibleTArray<HistogramAccumulation>&& aAccumulations);
|
|
mozilla::ipc::IPCResult RecvAccumulateChildKeyedHistograms(
|
|
InfallibleTArray<KeyedHistogramAccumulation>&& aAccumulations);
|
|
mozilla::ipc::IPCResult RecvUpdateChildScalars(
|
|
InfallibleTArray<ScalarAction>&& aScalarActions);
|
|
mozilla::ipc::IPCResult RecvUpdateChildKeyedScalars(
|
|
InfallibleTArray<KeyedScalarAction>&& aScalarActions);
|
|
mozilla::ipc::IPCResult RecvRecordChildEvents(
|
|
nsTArray<ChildEventData>&& events);
|
|
mozilla::ipc::IPCResult RecvRecordDiscardedData(
|
|
const DiscardedData& aDiscardedData);
|
|
|
|
void ActorDestroy(ActorDestroyReason aWhy) override;
|
|
bool SendRequestMemoryReport(const uint32_t& aGeneration,
|
|
const bool& aAnonymize,
|
|
const bool& aMinimizeMemoryUsage,
|
|
const MaybeFileDesc& aDMDFile);
|
|
|
|
private:
|
|
SocketProcessHost* mHost;
|
|
UniquePtr<ipc::CrashReporterHost> mCrashReporter;
|
|
UniquePtr<dom::MemoryReportRequestHost> mMemoryReportRequest;
|
|
|
|
static void Destroy(UniquePtr<SocketProcessParent>&& aParent);
|
|
};
|
|
|
|
} // namespace net
|
|
} // namespace mozilla
|
|
|
|
#endif // mozilla_net_SocketProcessParent_h
|