зеркало из 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:
Родитель
930be8d6aa
Коммит
74c5d8e760
|
@ -127,6 +127,9 @@ ISurfaceAllocator::DestroySharedSurface(SurfaceDescriptor* aSurface)
|
|||
if (!aSurface) {
|
||||
return;
|
||||
}
|
||||
if (!IPCOpen()) {
|
||||
return;
|
||||
}
|
||||
if (PlatformDestroySharedSurface(aSurface)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -124,6 +124,8 @@ ISurfaceAllocator() {}
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
virtual bool IPCOpen() const { return true; }
|
||||
|
||||
// Returns true if aSurface wraps a Shmem.
|
||||
static bool IsShmem(SurfaceDescriptor* aSurface);
|
||||
|
||||
|
|
|
@ -617,6 +617,12 @@ ShadowLayerForwarder::DeallocShmem(ipc::Shmem& aShmem)
|
|||
mShadowManager->DeallocShmem(aShmem);
|
||||
}
|
||||
|
||||
bool
|
||||
ShadowLayerForwarder::IPCOpen() const
|
||||
{
|
||||
return mShadowManager->IPCOpen();
|
||||
}
|
||||
|
||||
/*static*/ already_AddRefed<gfxASurface>
|
||||
ShadowLayerForwarder::OpenDescriptor(OpenMode aMode,
|
||||
const SurfaceDescriptor& aSurface)
|
||||
|
|
|
@ -394,6 +394,8 @@ public:
|
|||
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
|
||||
* LayerManagerComposite.
|
||||
|
|
Загрузка…
Ссылка в новой задаче