Bug 1420167 - Clean the current test system when creating a new VR test system; r?kip draft
authorDaosheng Mu <daoshengmu@gmail.com>
Wed, 29 Nov 2017 11:27:30 +0800
changeset 704936 3b8d74fb8c85498c50b042542b3c14f6801dcaf6
parent 703941 f5f03ee9e6abf77964f8dc1b9d69c6ccd3f655fd
child 742195 8be1a8311a443926d7f81f57ac33626854e6b4cf
push id91288
push userbmo:dmu@mozilla.com
push dateWed, 29 Nov 2017 06:05:20 +0000
reviewerskip
bugs1420167
milestone59.0a1
Bug 1420167 - Clean the current test system when creating a new VR test system; r?kip MozReview-Commit-ID: KrXOjHcnszE
gfx/vr/ipc/VRManagerParent.cpp
--- 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;