Bug 1430040 - Part 3: Closing Shmem only when VR process is shutdown. r=kip

Differential Revision: https://phabricator.services.mozilla.com/D15418

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Daosheng Mu 2018-12-28 22:38:14 +00:00
parent 8c4a82ad4b
commit a5651d4c31
2 changed files with 4 additions and 5 deletions

View File

@ -439,10 +439,6 @@ VRSystemManagerExternal::VRSystemManagerExternal(
mEnumerationCompleted = false;
#endif
mDoShutdown = false;
if (!aAPIShmem) {
OpenShmem();
}
}
VRSystemManagerExternal::~VRSystemManagerExternal() { CloseShmem(); }

View File

@ -1819,7 +1819,10 @@ void OpenVRSession::ProcessEvents(mozilla::gfx::VRSystemState& aSystemState) {
break;
case ::vr::EVREventType::VREvent_DriverRequestedQuit:
case ::vr::EVREventType::VREvent_Quit:
case ::vr::EVREventType::VREvent_ProcessQuit:
// When SteamVR runtime haven't been launched before viewing VR,
// SteamVR will send a VREvent_ProcessQuit event. It will tell the parent
// process to shutdown the VR process, and we need to avoid it.
// case ::vr::EVREventType::VREvent_ProcessQuit:
case ::vr::EVREventType::VREvent_QuitAcknowledged:
case ::vr::EVREventType::VREvent_QuitAborted_UserPrompt:
mShouldQuit = true;