summaryrefslogtreecommitdiffstats
path: root/gfx/layers/ipc/CompositorManagerParent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/layers/ipc/CompositorManagerParent.cpp')
-rw-r--r--gfx/layers/ipc/CompositorManagerParent.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/gfx/layers/ipc/CompositorManagerParent.cpp b/gfx/layers/ipc/CompositorManagerParent.cpp
index e20c7be..e6e0dcb 100644
--- a/gfx/layers/ipc/CompositorManagerParent.cpp
+++ b/gfx/layers/ipc/CompositorManagerParent.cpp
@@ -46,7 +46,8 @@ CompositorManagerParent::CreateSameProcess() {
return parent.forget();
}
-/* static */ void CompositorManagerParent::Create(
+/* static */
+bool CompositorManagerParent::Create(
Endpoint<PCompositorManagerParent>&& aEndpoint) {
MOZ_ASSERT(NS_IsMainThread());
@@ -54,6 +55,10 @@ CompositorManagerParent::CreateSameProcess() {
// (or UI process if it subsumbed the GPU process).
MOZ_ASSERT(aEndpoint.OtherPid() != base::GetCurrentProcId());
+ if (!CompositorThreadHolder::IsActive()) {
+ return false;
+ }
+
RefPtr<CompositorManagerParent> bridge = new CompositorManagerParent();
RefPtr<Runnable> runnable =
@@ -61,6 +66,7 @@ CompositorManagerParent::CreateSameProcess() {
"CompositorManagerParent::Bind", bridge,
&CompositorManagerParent::Bind, Move(aEndpoint));
CompositorThreadHolder::Loop()->PostTask(runnable.forget());
+ return true;
}
/* static */ already_AddRefed<CompositorBridgeParent>