summaryrefslogtreecommitdiffstats
path: root/gfx/layers/ipc/ImageBridgeParent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/layers/ipc/ImageBridgeParent.cpp')
-rw-r--r--gfx/layers/ipc/ImageBridgeParent.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/gfx/layers/ipc/ImageBridgeParent.cpp b/gfx/layers/ipc/ImageBridgeParent.cpp
index 15888b2..1fbbeff 100644
--- a/gfx/layers/ipc/ImageBridgeParent.cpp
+++ b/gfx/layers/ipc/ImageBridgeParent.cpp
@@ -92,6 +92,10 @@ ImageBridgeParent::~ImageBridgeParent() {}
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_GPU);
MessageLoop* loop = CompositorThreadHolder::Loop();
+ if (!loop) {
+ return false;
+ }
+
RefPtr<ImageBridgeParent> parent =
new ImageBridgeParent(loop, aEndpoint.OtherPid());
@@ -218,6 +222,9 @@ mozilla::ipc::IPCResult ImageBridgeParent::RecvUpdate(
/* static */ bool ImageBridgeParent::CreateForContent(
Endpoint<PImageBridgeParent>&& aEndpoint) {
MessageLoop* loop = CompositorThreadHolder::Loop();
+ if (!loop) {
+ return false;
+ }
RefPtr<ImageBridgeParent> bridge =
new ImageBridgeParent(loop, aEndpoint.OtherPid());