Bug 1574218 - Fix broken VRManagerChild::NotifyPresentationGenerationChanged event. r=kip
authorImanol Fernandez <mortimergoro@gmail.com>
Thu, 15 Aug 2019 23:18:41 +0000
changeset 488382 257776683ca2ea65d61b7e3cc1100e43a93cd6c3
parent 488381 8dc85cb7b8be0122ceda10fec5886ee92f3e4a6c
child 488383 a58b7dc85887bcc257f525c2ae1df4427f1df613
child 488386 f7db69e3462cf046fca6782483ec999bd997f982
push id113906
push userncsoregi@mozilla.com
push dateFri, 16 Aug 2019 04:07:24 +0000
treeherdermozilla-inbound@d887276421d3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskip
bugs1574218
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1574218 - Fix broken VRManagerChild::NotifyPresentationGenerationChanged event. r=kip Fix broken VRManagerChild::NotifyPresentationGenerationChanged event. Differential Revision: https://phabricator.services.mozilla.com/D42164
gfx/vr/ipc/VRManagerChild.cpp
--- a/gfx/vr/ipc/VRManagerChild.cpp
+++ b/gfx/vr/ipc/VRManagerChild.cpp
@@ -451,17 +451,17 @@ void VRManagerChild::FireDOMVRDisplayPre
 
 void VRManagerChild::FireDOMVRDisplayConnectEventsForLoadInternal(
     uint32_t aDisplayID, VRManagerEventObserver* aObserver) {
   aObserver->NotifyVRDisplayConnect(aDisplayID);
 }
 
 void VRManagerChild::NotifyPresentationGenerationChangedInternal(
     uint32_t aDisplayID) {
-  nsTArray<RefPtr<VRManagerEventObserver>> listeners;
+  nsTArray<RefPtr<VRManagerEventObserver>> listeners(mListeners);
   for (auto& listener : listeners) {
     listener->NotifyPresentationGenerationChanged(aDisplayID);
   }
 }
 
 void VRManagerChild::FireDOMVRDisplayConnectEventsForLoad(
     VRManagerEventObserver* aObserver) {
   // We need to fire the VRDisplayConnect event when a page is loaded