mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-04-01 20:13:00 +00:00
Backed out changeset a91870b97f09 (bug 1611886) for xpcshell failures at test_browserid_identity.js. CLOSED TREE
This commit is contained in:
parent
bd1db3c1fd
commit
615e78b5fc
@ -11,9 +11,14 @@
|
||||
#include "mozilla/layers/CompositorManagerParent.h"
|
||||
#include "mozilla/layers/ImageBridgeParent.h"
|
||||
#include "mozilla/media/MediaSystemResourceService.h"
|
||||
#include "VRManagerParent.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
namespace gfx {
|
||||
// See VRManagerChild.cpp
|
||||
void ReleaseVRManagerParentSingleton();
|
||||
} // namespace gfx
|
||||
|
||||
namespace layers {
|
||||
|
||||
static StaticRefPtr<CompositorThreadHolder> sCompositorThreadHolder;
|
||||
@ -120,7 +125,7 @@ void CompositorThreadHolder::Shutdown() {
|
||||
}
|
||||
|
||||
ImageBridgeParent::Shutdown();
|
||||
gfx::VRManagerParent::Shutdown();
|
||||
gfx::ReleaseVRManagerParentSingleton();
|
||||
MediaSystemResourceService::Shutdown();
|
||||
CompositorManagerParent::Shutdown();
|
||||
CanvasParent::Shutdown();
|
||||
|
@ -1119,22 +1119,6 @@ void VRManager::Shutdown() {
|
||||
// has been released.
|
||||
}
|
||||
|
||||
void VRManager::ShutdownVRManagerParents() {
|
||||
// Close removes the CanvasParent from the set so take a copy first.
|
||||
VRManagerParentSet vrManagerParents;
|
||||
for (auto iter = mVRManagerParents.Iter(); !iter.Done(); iter.Next()) {
|
||||
vrManagerParents.PutEntry(iter.Get()->GetKey());
|
||||
}
|
||||
|
||||
for (auto iter = vrManagerParents.Iter(); !iter.Done(); iter.Next()) {
|
||||
iter.Get()->GetKey()->Close();
|
||||
iter.Remove();
|
||||
}
|
||||
|
||||
MOZ_DIAGNOSTIC_ASSERT(mVRManagerParents.IsEmpty(),
|
||||
"Closing should have cleared all entries.");
|
||||
}
|
||||
|
||||
void VRManager::CheckWatchDog() {
|
||||
/**
|
||||
* We will trigger a new frame immediately after a successful frame
|
||||
|
@ -59,7 +59,6 @@ class VRManager : nsIObserver {
|
||||
void StopVRNavigation(const uint32_t& aDisplayID,
|
||||
const TimeDuration& aTimeout);
|
||||
void Shutdown();
|
||||
void ShutdownVRManagerParents();
|
||||
#if !defined(MOZ_WIDGET_ANDROID)
|
||||
bool RunPuppet(const nsTArray<uint64_t>& aBuffer,
|
||||
VRManagerParent* aManagerParent);
|
||||
|
@ -19,9 +19,6 @@ namespace mozilla {
|
||||
using namespace layers;
|
||||
namespace gfx {
|
||||
|
||||
// See VRManagerChild.cpp
|
||||
void ReleaseVRManagerParentSingleton();
|
||||
|
||||
VRManagerParent::VRManagerParent(ProcessId aChildProcessId,
|
||||
bool aIsContentChild)
|
||||
: mHaveEventListener(false),
|
||||
@ -127,31 +124,18 @@ bool VRManagerParent::CreateForGPUProcess(
|
||||
return true;
|
||||
}
|
||||
|
||||
/*static*/
|
||||
void VRManagerParent::Shutdown() {
|
||||
CompositorThreadHolder::Loop()->PostTask(NS_NewRunnableFunction(
|
||||
"VRManagerParent::Shutdown",
|
||||
[]() -> void { VRManagerParent::ShutdownInternal(); }));
|
||||
}
|
||||
|
||||
/*static*/
|
||||
void VRManagerParent::ShutdownInternal() {
|
||||
VRManager* vm = VRManager::Get();
|
||||
if (!vm) {
|
||||
return;
|
||||
}
|
||||
vm->ShutdownVRManagerParents();
|
||||
ReleaseVRManagerParentSingleton();
|
||||
}
|
||||
|
||||
void VRManagerParent::ActorDestroy(ActorDestroyReason why) {}
|
||||
|
||||
void VRManagerParent::ActorDealloc() {
|
||||
UnregisterFromManager();
|
||||
void VRManagerParent::DeferredDestroy() {
|
||||
mCompositorThreadHolder = nullptr;
|
||||
mSelfRef = nullptr;
|
||||
}
|
||||
|
||||
void VRManagerParent::ActorDestroy(ActorDestroyReason why) {
|
||||
UnregisterFromManager();
|
||||
MessageLoop::current()->PostTask(
|
||||
NewRunnableMethod("gfx::VRManagerParent::DeferredDestroy", this,
|
||||
&VRManagerParent::DeferredDestroy));
|
||||
}
|
||||
|
||||
void VRManagerParent::OnChannelConnected(int32_t aPid) {
|
||||
mCompositorThreadHolder = CompositorThreadHolder::GetSingleton();
|
||||
}
|
||||
|
@ -32,7 +32,6 @@ class VRManagerParent final : public PVRManagerParent {
|
||||
static VRManagerParent* CreateSameProcess();
|
||||
static bool CreateForGPUProcess(Endpoint<PVRManagerParent>&& aEndpoint);
|
||||
static bool CreateForContent(Endpoint<PVRManagerParent>&& aEndpoint);
|
||||
static void Shutdown();
|
||||
|
||||
bool IsSameProcess() const;
|
||||
bool HaveEventListener();
|
||||
@ -74,7 +73,6 @@ class VRManagerParent final : public PVRManagerParent {
|
||||
mozilla::ipc::IPCResult RecvResetPuppet();
|
||||
|
||||
private:
|
||||
void ActorDealloc() override;
|
||||
void RegisterWithManager();
|
||||
void UnregisterFromManager();
|
||||
|
||||
@ -82,7 +80,7 @@ class VRManagerParent final : public PVRManagerParent {
|
||||
|
||||
static void RegisterVRManagerInCompositorThread(VRManagerParent* aVRManager);
|
||||
|
||||
static void ShutdownInternal();
|
||||
void DeferredDestroy();
|
||||
|
||||
// This keeps us alive until ActorDestroy(), at which point we do a
|
||||
// deferred destruction of ourselves.
|
||||
|
Loading…
x
Reference in New Issue
Block a user