зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1540731 - Part 2: Move toplevel actors to override ActorDestroy, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D28573 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
c293c9007f
Коммит
95e8f0306b
|
@ -131,9 +131,7 @@ void RemoteDecoderManagerChild::ActorDestroy(ActorDestroyReason aWhy) {
|
|||
mCanSend = false;
|
||||
}
|
||||
|
||||
void RemoteDecoderManagerChild::DeallocPRemoteDecoderManagerChild() {
|
||||
mIPDLSelfRef = nullptr;
|
||||
}
|
||||
void RemoteDecoderManagerChild::ActorDealloc() { mIPDLSelfRef = nullptr; }
|
||||
|
||||
bool RemoteDecoderManagerChild::CanSend() {
|
||||
MOZ_ASSERT(NS_GetCurrentThread() == GetManagerThread());
|
||||
|
|
|
@ -33,7 +33,7 @@ class RemoteDecoderManagerChild final : public PRemoteDecoderManagerChild {
|
|||
void InitIPDL();
|
||||
|
||||
void ActorDestroy(ActorDestroyReason aWhy) override;
|
||||
void DeallocPRemoteDecoderManagerChild() override;
|
||||
void ActorDealloc() override;
|
||||
|
||||
PRemoteDecoderChild* AllocPRemoteDecoderChild(
|
||||
const RemoteDecoderInfoIPDL& aRemoteDecoderInfo,
|
||||
|
|
|
@ -190,8 +190,6 @@ void RemoteDecoderManagerParent::Open(
|
|||
AddRef();
|
||||
}
|
||||
|
||||
void RemoteDecoderManagerParent::DeallocPRemoteDecoderManagerParent() {
|
||||
Release();
|
||||
}
|
||||
void RemoteDecoderManagerParent::ActorDealloc() { Release(); }
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -34,7 +34,7 @@ class RemoteDecoderManagerParent final : public PRemoteDecoderManagerParent {
|
|||
|
||||
void ActorDestroy(mozilla::ipc::IProtocol::ActorDestroyReason) override;
|
||||
|
||||
void DeallocPRemoteDecoderManagerParent() override;
|
||||
void ActorDealloc() override;
|
||||
|
||||
private:
|
||||
explicit RemoteDecoderManagerParent(
|
||||
|
|
|
@ -153,9 +153,7 @@ void VideoDecoderManagerChild::ActorDestroy(ActorDestroyReason aWhy) {
|
|||
mCanSend = false;
|
||||
}
|
||||
|
||||
void VideoDecoderManagerChild::DeallocPVideoDecoderManagerChild() {
|
||||
mIPDLSelfRef = nullptr;
|
||||
}
|
||||
void VideoDecoderManagerChild::ActorDealloc() { mIPDLSelfRef = nullptr; }
|
||||
|
||||
bool VideoDecoderManagerChild::CanSend() {
|
||||
MOZ_ASSERT(NS_GetCurrentThread() == GetManagerThread());
|
||||
|
|
|
@ -67,7 +67,7 @@ class VideoDecoderManagerChild final : public PVideoDecoderManagerChild,
|
|||
void InitIPDL();
|
||||
|
||||
void ActorDestroy(ActorDestroyReason aWhy) override;
|
||||
void DeallocPVideoDecoderManagerChild() override;
|
||||
void ActorDealloc() override;
|
||||
|
||||
void HandleFatalError(const char* aMsg) const override;
|
||||
|
||||
|
|
|
@ -223,9 +223,7 @@ void VideoDecoderManagerParent::Open(
|
|||
AddRef();
|
||||
}
|
||||
|
||||
void VideoDecoderManagerParent::DeallocPVideoDecoderManagerParent() {
|
||||
Release();
|
||||
}
|
||||
void VideoDecoderManagerParent::ActorDealloc() { Release(); }
|
||||
|
||||
mozilla::ipc::IPCResult VideoDecoderManagerParent::RecvReadback(
|
||||
const SurfaceDescriptorGPUVideo& aSD, SurfaceDescriptor* aResult) {
|
||||
|
|
|
@ -48,7 +48,7 @@ class VideoDecoderManagerParent final : public PVideoDecoderManagerParent {
|
|||
|
||||
void ActorDestroy(mozilla::ipc::IProtocol::ActorDestroyReason) override;
|
||||
|
||||
void DeallocPVideoDecoderManagerParent() override;
|
||||
void ActorDealloc() override;
|
||||
|
||||
private:
|
||||
explicit VideoDecoderManagerParent(
|
||||
|
|
|
@ -115,7 +115,7 @@ void VsyncBridgeChild::ActorDestroy(ActorDestroyReason aWhy) {
|
|||
}
|
||||
}
|
||||
|
||||
void VsyncBridgeChild::DeallocPVsyncBridgeChild() { Release(); }
|
||||
void VsyncBridgeChild::ActorDealloc() { Release(); }
|
||||
|
||||
void VsyncBridgeChild::ProcessingError(Result aCode, const char* aReason) {
|
||||
MOZ_RELEASE_ASSERT(aCode == MsgDropped,
|
||||
|
|
|
@ -27,7 +27,7 @@ class VsyncBridgeChild final : public PVsyncBridgeChild {
|
|||
void Close();
|
||||
|
||||
void ActorDestroy(ActorDestroyReason aWhy) override;
|
||||
void DeallocPVsyncBridgeChild() override;
|
||||
void ActorDealloc() override;
|
||||
void ProcessingError(Result aCode, const char* aReason) override;
|
||||
|
||||
void NotifyVsync(const VsyncEvent& aVsync, const layers::LayersId& aLayersId);
|
||||
|
|
|
@ -70,7 +70,7 @@ void VsyncBridgeParent::ActorDestroy(ActorDestroyReason aWhy) {
|
|||
mCompositorThreadRef = nullptr;
|
||||
}
|
||||
|
||||
void VsyncBridgeParent::DeallocPVsyncBridgeParent() { Release(); }
|
||||
void VsyncBridgeParent::ActorDealloc() { Release(); }
|
||||
|
||||
} // namespace gfx
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -26,7 +26,7 @@ class VsyncBridgeParent final : public PVsyncBridgeParent {
|
|||
mozilla::ipc::IPCResult RecvNotifyVsync(const VsyncEvent& aVsync,
|
||||
const LayersId& aLayersId);
|
||||
void ActorDestroy(ActorDestroyReason aWhy) override;
|
||||
void DeallocPVsyncBridgeParent() override;
|
||||
void ActorDealloc() override;
|
||||
|
||||
void Shutdown();
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@ CompositorManagerChild::CompositorManagerChild(
|
|||
SetReplyTimeout();
|
||||
}
|
||||
|
||||
void CompositorManagerChild::DeallocPCompositorManagerChild() {
|
||||
void CompositorManagerChild::ActorDealloc() {
|
||||
MOZ_ASSERT(!mCanSend);
|
||||
Release();
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ class CompositorManagerChild : public PCompositorManagerChild {
|
|||
|
||||
virtual ~CompositorManagerChild() = default;
|
||||
|
||||
void DeallocPCompositorManagerChild() override;
|
||||
void ActorDealloc() override;
|
||||
|
||||
already_AddRefed<nsIEventTarget> GetSpecificMessageEventTarget(
|
||||
const Message& aMsg) override;
|
||||
|
|
|
@ -158,7 +158,7 @@ void CompositorManagerParent::ActorDestroy(ActorDestroyReason aReason) {
|
|||
}
|
||||
}
|
||||
|
||||
void CompositorManagerParent::DeallocPCompositorManagerParent() {
|
||||
void CompositorManagerParent::ActorDealloc() {
|
||||
MessageLoop::current()->PostTask(
|
||||
NewRunnableMethod("layers::CompositorManagerParent::DeferredDestroy",
|
||||
this, &CompositorManagerParent::DeferredDestroy));
|
||||
|
|
|
@ -74,7 +74,7 @@ class CompositorManagerParent final : public PCompositorManagerParent {
|
|||
|
||||
void Bind(Endpoint<PCompositorManagerParent>&& aEndpoint, bool aIsRoot);
|
||||
|
||||
void DeallocPCompositorManagerParent() override;
|
||||
void ActorDealloc() override;
|
||||
|
||||
void DeferredDestroy();
|
||||
|
||||
|
|
|
@ -214,7 +214,7 @@ void ImageBridgeChild::ActorDestroy(ActorDestroyReason aWhy) {
|
|||
}
|
||||
}
|
||||
|
||||
void ImageBridgeChild::DeallocPImageBridgeChild() { this->Release(); }
|
||||
void ImageBridgeChild::ActorDealloc() { this->Release(); }
|
||||
|
||||
void ImageBridgeChild::CreateImageClientSync(SynchronousTask* aTask,
|
||||
RefPtr<ImageClient>* result,
|
||||
|
|
|
@ -368,7 +368,7 @@ class ImageBridgeChild final : public PImageBridgeChild,
|
|||
void MarkShutDown();
|
||||
|
||||
void ActorDestroy(ActorDestroyReason aWhy) override;
|
||||
void DeallocPImageBridgeChild() override;
|
||||
void ActorDealloc() override;
|
||||
|
||||
bool CanSend() const;
|
||||
bool CanPostTask() const;
|
||||
|
|
|
@ -215,7 +215,7 @@ void UiCompositorControllerChild::ActorDestroy(ActorDestroyReason aWhy) {
|
|||
}
|
||||
}
|
||||
|
||||
void UiCompositorControllerChild::DeallocPUiCompositorControllerChild() {
|
||||
void UiCompositorControllerChild::ActorDealloc() {
|
||||
if (mParent) {
|
||||
mParent = nullptr;
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ class UiCompositorControllerChild final
|
|||
|
||||
protected:
|
||||
void ActorDestroy(ActorDestroyReason aWhy) override;
|
||||
void DeallocPUiCompositorControllerChild() override;
|
||||
void ActorDealloc() override;
|
||||
void ProcessingError(Result aCode, const char* aReason) override;
|
||||
void HandleFatalError(const char* aMsg) const override;
|
||||
mozilla::ipc::IPCResult RecvToolbarAnimatorMessageFromCompositor(
|
||||
|
|
|
@ -213,7 +213,7 @@ UiCompositorControllerParent::RecvToolbarPixelsToCompositor(
|
|||
|
||||
void UiCompositorControllerParent::ActorDestroy(ActorDestroyReason aWhy) {}
|
||||
|
||||
void UiCompositorControllerParent::DeallocPUiCompositorControllerParent() {
|
||||
void UiCompositorControllerParent::ActorDealloc() {
|
||||
MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread());
|
||||
Shutdown();
|
||||
Release(); // For AddRef in Initialize()
|
||||
|
|
|
@ -54,7 +54,7 @@ class UiCompositorControllerParent final
|
|||
mozilla::ipc::IPCResult RecvToolbarPixelsToCompositor(
|
||||
Shmem&& aMem, const ScreenIntSize& aSize);
|
||||
void ActorDestroy(ActorDestroyReason aWhy) override;
|
||||
void DeallocPUiCompositorControllerParent() override;
|
||||
void ActorDealloc() override;
|
||||
|
||||
// Class specific functions
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
|
|
|
@ -77,7 +77,7 @@ void VideoBridgeChild::ActorDestroy(ActorDestroyReason aWhy) {
|
|||
mCanSend = false;
|
||||
}
|
||||
|
||||
void VideoBridgeChild::DeallocPVideoBridgeChild() { mIPDLSelfRef = nullptr; }
|
||||
void VideoBridgeChild::ActorDealloc() { mIPDLSelfRef = nullptr; }
|
||||
|
||||
PTextureChild* VideoBridgeChild::CreateTexture(
|
||||
const SurfaceDescriptor& aSharedData, const ReadLockDescriptor& aReadLock,
|
||||
|
|
|
@ -33,7 +33,7 @@ class VideoBridgeChild final : public PVideoBridgeChild,
|
|||
bool DeallocPTextureChild(PTextureChild* actor);
|
||||
|
||||
void ActorDestroy(ActorDestroyReason aWhy) override;
|
||||
void DeallocPVideoBridgeChild() override;
|
||||
void ActorDealloc() override;
|
||||
|
||||
// ISurfaceAllocator
|
||||
bool AllocUnsafeShmem(size_t aSize,
|
||||
|
|
|
@ -38,7 +38,7 @@ void VideoBridgeParent::ActorDestroy(ActorDestroyReason aWhy) {
|
|||
mClosed = true;
|
||||
}
|
||||
|
||||
void VideoBridgeParent::DeallocPVideoBridgeParent() {
|
||||
void VideoBridgeParent::ActorDealloc() {
|
||||
mCompositorThreadRef = nullptr;
|
||||
mSelfRef = nullptr;
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ class VideoBridgeParent final : public PVideoBridgeParent,
|
|||
void DeallocShmem(ipc::Shmem& aShmem) override;
|
||||
|
||||
private:
|
||||
void DeallocPVideoBridgeParent() override;
|
||||
void ActorDealloc() override;
|
||||
|
||||
// This keeps us alive until ActorDestroy(), at which point we do a
|
||||
// deferred destruction of ourselves.
|
||||
|
|
|
@ -53,7 +53,7 @@ class InProcessChild : public PInProcessChild {
|
|||
// NOTE: PInProcess lifecycle management is declared as staic methods and
|
||||
// state on InProcessParent, and implemented in InProcessImpl.cpp.
|
||||
virtual void ActorDestroy(ActorDestroyReason aWhy) override;
|
||||
virtual void DeallocPInProcessChild() override;
|
||||
virtual void ActorDealloc() override;
|
||||
~InProcessChild() = default;
|
||||
|
||||
static StaticRefPtr<InProcessChild> sSingleton;
|
||||
|
|
|
@ -120,12 +120,12 @@ void InProcessChild::ActorDestroy(ActorDestroyReason aWhy) {
|
|||
InProcessParent::Shutdown();
|
||||
}
|
||||
|
||||
void InProcessParent::DeallocPInProcessParent() {
|
||||
void InProcessParent::ActorDealloc() {
|
||||
MOZ_ASSERT(!InProcessParent::sSingleton);
|
||||
Release(); // Release the reference taken in InProcessParent::Startup.
|
||||
}
|
||||
|
||||
void InProcessChild::DeallocPInProcessChild() {
|
||||
void InProcessChild::ActorDealloc() {
|
||||
MOZ_ASSERT(!InProcessChild::sSingleton);
|
||||
Release(); // Release the reference taken in InProcessParent::Startup.
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ class InProcessParent : public nsIObserver, public PInProcessParent {
|
|||
private:
|
||||
// Lifecycle management is implemented in InProcessImpl.cpp
|
||||
virtual void ActorDestroy(ActorDestroyReason aWhy) override;
|
||||
virtual void DeallocPInProcessParent() override;
|
||||
virtual void ActorDealloc() override;
|
||||
~InProcessParent() = default;
|
||||
|
||||
static void Startup();
|
||||
|
|
|
@ -512,7 +512,7 @@ void StreamFilterChild::ActorDestroy(ActorDestroyReason aWhy) {
|
|||
mStreamFilter = nullptr;
|
||||
}
|
||||
|
||||
void StreamFilterChild::DeallocPStreamFilterChild() {
|
||||
void StreamFilterChild::ActorDealloc() {
|
||||
RefPtr<StreamFilterChild> self = dont_AddRef(this);
|
||||
}
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ class StreamFilterChild final : public PStreamFilterChild,
|
|||
IPCResult RecvResumed();
|
||||
IPCResult RecvFlushData();
|
||||
|
||||
virtual void DeallocPStreamFilterChild() override;
|
||||
virtual void ActorDealloc() override;
|
||||
|
||||
void SetStreamFilter(StreamFilter* aStreamFilter) {
|
||||
mStreamFilter = aStreamFilter;
|
||||
|
|
|
@ -699,7 +699,7 @@ void StreamFilterParent::ActorDestroy(ActorDestroyReason aWhy) {
|
|||
}
|
||||
}
|
||||
|
||||
void StreamFilterParent::DeallocPStreamFilterParent() {
|
||||
void StreamFilterParent::ActorDealloc() {
|
||||
RefPtr<StreamFilterParent> self = dont_AddRef(this);
|
||||
}
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ class StreamFilterParent final : public PStreamFilterParent,
|
|||
IPCResult RecvDisconnect();
|
||||
IPCResult RecvDestroy();
|
||||
|
||||
virtual void DeallocPStreamFilterParent() override;
|
||||
virtual void ActorDealloc() override;
|
||||
|
||||
private:
|
||||
bool IPCActive() {
|
||||
|
|
|
@ -246,6 +246,6 @@ void ProfilerParent::ActorDestroy(ActorDestroyReason aActorDestroyReason) {
|
|||
mDestroyed = true;
|
||||
}
|
||||
|
||||
void ProfilerParent::DeallocPProfilerParent() { mSelfRef = nullptr; }
|
||||
void ProfilerParent::ActorDealloc() { mSelfRef = nullptr; }
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -68,7 +68,7 @@ class ProfilerParent final : public PProfilerParent {
|
|||
|
||||
void Init();
|
||||
void ActorDestroy(ActorDestroyReason aActorDestroyReason) override;
|
||||
void DeallocPProfilerParent() override;
|
||||
void ActorDealloc() override;
|
||||
|
||||
RefPtr<ProfilerParent> mSelfRef;
|
||||
nsTArray<MozPromiseHolder<SingleProcessProfilePromise>>
|
||||
|
|
Загрузка…
Ссылка в новой задаче