From 7cd30b6720971d61a0397dafa43799a69cff9fc8 Mon Sep 17 00:00:00 2001 From: Daosheng Mu Date: Fri, 11 Jan 2019 22:50:03 +0000 Subject: [PATCH] Bug 1516554 - Part 5: Allow VR using the existing shmem. r=kip Differential Revision: https://phabricator.services.mozilla.com/D16259 --HG-- extra : moz-landing-system : lando --- gfx/vr/gfxVRExternal.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gfx/vr/gfxVRExternal.cpp b/gfx/vr/gfxVRExternal.cpp index 3735e853b457..d1419dc4494e 100644 --- a/gfx/vr/gfxVRExternal.cpp +++ b/gfx/vr/gfxVRExternal.cpp @@ -486,7 +486,8 @@ void VRSystemManagerExternal::OpenShmem() { mShmemFile = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(VRExternalShmem), kShmemName); - MOZ_ASSERT(GetLastError() == 0); + MOZ_ASSERT(GetLastError() == 0 || GetLastError() == ERROR_ALREADY_EXISTS); + MOZ_ASSERT(mShmemFile); } else { mShmemFile = OpenFileMappingA(FILE_MAP_ALL_ACCESS, FALSE, kShmemName); }