Bug 974356 - 3/4 - Make TextureHost::CreateIPDLActor check for bad MemoryTextures - r=nical

This commit is contained in:
Benoit Jacob 2014-02-25 08:12:49 -05:00
Родитель 522c9a1fee
Коммит f095290ef2
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -61,6 +61,12 @@ TextureHost::CreateIPDLActor(ISurfaceAllocator* aAllocator,
const SurfaceDescriptor& aSharedData,
TextureFlags aFlags)
{
if (aSharedData.type() == SurfaceDescriptor::TSurfaceDescriptorMemory &&
!aAllocator->IsSameProcess())
{
NS_ERROR("A client process is trying to peek at our address space using a MemoryTexture!");
return nullptr;
}
TextureParent* actor = new TextureParent(aAllocator);
DebugOnly<bool> status = actor->Init(aSharedData, aFlags);
MOZ_ASSERT(status);