Bug 1420167 - Clean the current test system when creating a new VR test system; r?kip
MozReview-Commit-ID: KrXOjHcnszE
--- a/gfx/vr/ipc/VRManagerParent.cpp
+++ b/gfx/vr/ipc/VRManagerParent.cpp
@@ -244,16 +244,18 @@ VRManagerParent::RecvControllerListenerR
mozilla::ipc::IPCResult
VRManagerParent::RecvCreateVRTestSystem()
{
VRManager* vm = VRManager::Get();
vm->CreateVRTestSystem();
mDisplayTestID = 0;
mControllerTestID = 0;
+ mVRDisplayTests.Clear();
+ mVRControllerTests.Clear();
return IPC_OK();
}
mozilla::ipc::IPCResult
VRManagerParent::RecvCreateVRServiceTestDisplay(const nsCString& aID, const uint32_t& aPromiseID)
{
nsTArray<VRDisplayInfo> displayInfoArray;
impl::VRDisplayPuppet* displayPuppet = nullptr;