VRManagerChild::ShutDown() was implemented by mimicking [CompositorBridgeChild::ShutDown()](https://searchfox.org/mozilla-central/rev/1db5ef59eba65d32d6a29a494e87b6078453e559/gfx/layers/ipc/CompositorBridgeChild.cpp#229). It is called from [CompositorManagerChild::Shutdown()](https://searchfox.org/mozilla-central/rev/1db5ef59eba65d32d6a29a494e87b6078453e559/gfx/layers/ipc/CompositorManagerChild.cpp#73). CompositorBridgeChild::ShutDown() is already used in gecko, then I thought that VRManagerChild::ShutDown() should work well. But there was a difference in [ContentChild::RecvReinitRendering()](https://searchfox.org/mozilla-central/rev/1db5ef59eba65d32d6a29a494e87b6078453e559/dom/ipc/ContentChild.cpp#1607). For CompositorManagerChild, CompositorManagerChild::Init() is called. But for VRManagerChild, [VRManagerChild::ReinitForContent() ](https://searchfox.org/mozilla-central/rev/1db5ef59eba65d32d6a29a494e87b6078453e559/gfx/vr/ipc/VRManagerChild.cpp#104) is called. And [VRManagerChild::ReinitForContent() ](https://searchfox.org/mozilla-central/rev/1db5ef59eba65d32d6a29a494e87b6078453e559/gfx/vr/ipc/VRManagerChild.cpp#104) calls VRManagerChild::ShutDown() in it.
Bug 1614570 Comment 9 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
VRManagerChild::ShutDown() was implemented by mimicking [CompositorBridgeChild::ShutDown()](https://searchfox.org/mozilla-central/rev/1db5ef59eba65d32d6a29a494e87b6078453e559/gfx/layers/ipc/CompositorBridgeChild.cpp#229). It is called from [CompositorManagerChild::Shutdown()](https://searchfox.org/mozilla-central/rev/1db5ef59eba65d32d6a29a494e87b6078453e559/gfx/layers/ipc/CompositorManagerChild.cpp#73). CompositorBridgeChild::ShutDown() is already used in gecko, then I thought that VRManagerChild::ShutDown() should work well. But there was a difference in [ContentChild::RecvReinitRendering()](https://searchfox.org/mozilla-central/rev/1db5ef59eba65d32d6a29a494e87b6078453e559/dom/ipc/ContentChild.cpp#1607). For CompositorManagerChild, CompositorManagerChild::Init() is called. But for VRManagerChild, [VRManagerChild::ReinitForContent() ](https://searchfox.org/mozilla-central/rev/1db5ef59eba65d32d6a29a494e87b6078453e559/gfx/vr/ipc/VRManagerChild.cpp#104) is called. And [VRManagerChild::ReinitForContent() ](https://searchfox.org/mozilla-central/rev/1db5ef59eba65d32d6a29a494e87b6078453e559/gfx/vr/ipc/VRManagerChild.cpp#104) calls VRManagerChild::ShutDown() in it. From the above, it seems that the problem could be addressed by changing VRManagerChild more similar to CompositorManagerChild.