# HG changeset patch # User sotaro # Date 1521025709 -32400 # Node ID e9ad11e8506abf3b5d496714210fc022e2b55980 # Parent a941a2319f0b1c0624f935010203eee6157d7824 Bug 1443671 - Check aImageContainer in ImageBridgeChild::Connect() r=nical diff --git a/gfx/layers/ipc/ImageBridgeChild.cpp b/gfx/layers/ipc/ImageBridgeChild.cpp --- a/gfx/layers/ipc/ImageBridgeChild.cpp +++ b/gfx/layers/ipc/ImageBridgeChild.cpp @@ -319,17 +319,19 @@ ImageBridgeChild::Connect(CompositableCl MOZ_ASSERT(CanSend()); // Note: this is static, rather than per-IBC, so IDs are not re-used across // ImageBridgeChild instances. This is relevant for the GPU process, where // we don't want old IDs to potentially leak into a recreated ImageBridge. static uint64_t sNextID = 1; uint64_t id = sNextID++; - { + // ImageClient of ImageContainer provides aImageContainer. + // But offscreen canvas does not provide it. + if (aImageContainer) { MutexAutoLock lock(mContainerMapLock); MOZ_ASSERT(!mImageContainerListeners.Contains(id)); mImageContainerListeners.Put(id, aImageContainer->GetImageContainerListener()); } CompositableHandle handle(id); aCompositable->InitIPDL(handle); SendNewCompositable(handle, aCompositable->GetTextureInfo(), GetCompositorBackendType());