зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1657404 - Change PGamepadTestChannel to "refcounted protocol" r=handyman
Depends on D93022 Differential Revision: https://phabricator.services.mozilla.com/D93023
This commit is contained in:
Родитель
c1246c7e52
Коммит
666018b3dd
|
@ -73,8 +73,7 @@ void GamepadServiceTest::InitPBackgroundActor() {
|
|||
|
||||
mChild = GamepadTestChannelChild::Create();
|
||||
PGamepadTestChannelChild* initedChild =
|
||||
actor->SendPGamepadTestChannelConstructor(
|
||||
RefPtr<GamepadTestChannelChild>(mChild).forget().take());
|
||||
actor->SendPGamepadTestChannelConstructor(mChild.get());
|
||||
if (NS_WARN_IF(!initedChild)) {
|
||||
MOZ_CRASH("Failed to create a PBackgroundChild actor!");
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ include GamepadEventTypes;
|
|||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
async protocol PGamepadTestChannel {
|
||||
refcounted protocol PGamepadTestChannel {
|
||||
manager PBackground;
|
||||
parent:
|
||||
async GamepadTestEvent(uint32_t aID, GamepadChangeEvent aGamepadEvent);
|
||||
|
|
|
@ -619,20 +619,6 @@ bool BackgroundChildImpl::DeallocPGamepadEventChannelChild(
|
|||
return true;
|
||||
}
|
||||
|
||||
dom::PGamepadTestChannelChild*
|
||||
BackgroundChildImpl::AllocPGamepadTestChannelChild() {
|
||||
MOZ_CRASH("PGamepadTestChannelChild actor should be manually constructed!");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool BackgroundChildImpl::DeallocPGamepadTestChannelChild(
|
||||
PGamepadTestChannelChild* aActor) {
|
||||
MOZ_ASSERT(aActor);
|
||||
RefPtr<dom::GamepadTestChannelChild> child(
|
||||
dont_AddRef(static_cast<dom::GamepadTestChannelChild*>(aActor)));
|
||||
return true;
|
||||
}
|
||||
|
||||
mozilla::dom::PClientManagerChild*
|
||||
BackgroundChildImpl::AllocPClientManagerChild() {
|
||||
return mozilla::dom::AllocClientManagerChild();
|
||||
|
|
|
@ -229,11 +229,6 @@ class BackgroundChildImpl : public PBackgroundChild,
|
|||
virtual bool DeallocPGamepadEventChannelChild(
|
||||
PGamepadEventChannelChild* aActor) override;
|
||||
|
||||
virtual PGamepadTestChannelChild* AllocPGamepadTestChannelChild() override;
|
||||
|
||||
virtual bool DeallocPGamepadTestChannelChild(
|
||||
PGamepadTestChannelChild* aActor) override;
|
||||
|
||||
virtual PClientManagerChild* AllocPClientManagerChild() override;
|
||||
|
||||
virtual bool DeallocPClientManagerChild(PClientManagerChild* aActor) override;
|
||||
|
|
|
@ -1120,17 +1120,9 @@ BackgroundParentImpl::RecvPGamepadEventChannelConstructor(
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
dom::PGamepadTestChannelParent*
|
||||
already_AddRefed<dom::PGamepadTestChannelParent>
|
||||
BackgroundParentImpl::AllocPGamepadTestChannelParent() {
|
||||
return dom::GamepadTestChannelParent::Create().take();
|
||||
}
|
||||
|
||||
bool BackgroundParentImpl::DeallocPGamepadTestChannelParent(
|
||||
dom::PGamepadTestChannelParent* aActor) {
|
||||
MOZ_ASSERT(aActor);
|
||||
RefPtr<dom::GamepadTestChannelParent> parent =
|
||||
dont_AddRef(static_cast<dom::GamepadTestChannelParent*>(aActor));
|
||||
return true;
|
||||
return dom::GamepadTestChannelParent::Create();
|
||||
}
|
||||
|
||||
dom::PWebAuthnTransactionParent*
|
||||
|
|
|
@ -332,10 +332,8 @@ class BackgroundParentImpl : public PBackgroundParent,
|
|||
virtual mozilla::ipc::IPCResult RecvPGamepadEventChannelConstructor(
|
||||
PGamepadEventChannelParent* aActor) override;
|
||||
|
||||
virtual PGamepadTestChannelParent* AllocPGamepadTestChannelParent() override;
|
||||
|
||||
virtual bool DeallocPGamepadTestChannelParent(
|
||||
PGamepadTestChannelParent* aActor) override;
|
||||
virtual already_AddRefed<PGamepadTestChannelParent>
|
||||
AllocPGamepadTestChannelParent() override;
|
||||
|
||||
virtual PWebAuthnTransactionParent* AllocPWebAuthnTransactionParent()
|
||||
override;
|
||||
|
|
Загрузка…
Ссылка в новой задаче