зеркало из https://github.com/mozilla/gecko-dev.git
Bug 933082 - Part 2: propagate the mIPCOpen flag, avoid crashing in DestroySharedSurface on a dead channel - r=nical
This commit is contained in:
Родитель
927f3a5008
Коммит
a1decdf354
|
@ -127,6 +127,9 @@ ISurfaceAllocator::DestroySharedSurface(SurfaceDescriptor* aSurface)
|
||||||
if (!aSurface) {
|
if (!aSurface) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!IPCOpen()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (PlatformDestroySharedSurface(aSurface)) {
|
if (PlatformDestroySharedSurface(aSurface)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,6 +124,8 @@ ISurfaceAllocator() {}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual bool IPCOpen() const { return true; }
|
||||||
|
|
||||||
// Returns true if aSurface wraps a Shmem.
|
// Returns true if aSurface wraps a Shmem.
|
||||||
static bool IsShmem(SurfaceDescriptor* aSurface);
|
static bool IsShmem(SurfaceDescriptor* aSurface);
|
||||||
|
|
||||||
|
|
|
@ -617,6 +617,12 @@ ShadowLayerForwarder::DeallocShmem(ipc::Shmem& aShmem)
|
||||||
mShadowManager->DeallocShmem(aShmem);
|
mShadowManager->DeallocShmem(aShmem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
ShadowLayerForwarder::IPCOpen() const
|
||||||
|
{
|
||||||
|
return mShadowManager->IPCOpen();
|
||||||
|
}
|
||||||
|
|
||||||
/*static*/ already_AddRefed<gfxASurface>
|
/*static*/ already_AddRefed<gfxASurface>
|
||||||
ShadowLayerForwarder::OpenDescriptor(OpenMode aMode,
|
ShadowLayerForwarder::OpenDescriptor(OpenMode aMode,
|
||||||
const SurfaceDescriptor& aSurface)
|
const SurfaceDescriptor& aSurface)
|
||||||
|
|
|
@ -394,6 +394,8 @@ public:
|
||||||
mozilla::ipc::Shmem* aShmem) MOZ_OVERRIDE;
|
mozilla::ipc::Shmem* aShmem) MOZ_OVERRIDE;
|
||||||
virtual void DeallocShmem(mozilla::ipc::Shmem& aShmem) MOZ_OVERRIDE;
|
virtual void DeallocShmem(mozilla::ipc::Shmem& aShmem) MOZ_OVERRIDE;
|
||||||
|
|
||||||
|
virtual bool IPCOpen() const MOZ_OVERRIDE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct a shadow of |aLayer| on the "other side", at the
|
* Construct a shadow of |aLayer| on the "other side", at the
|
||||||
* LayerManagerComposite.
|
* LayerManagerComposite.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче