mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1000161 - No more crashy asserts in LayerTransactionParent - r=nical
This commit is contained in:
parent
d856de0fea
commit
f9f7182dfe
@ -15,7 +15,6 @@
|
||||
#include "gfxPoint3D.h" // for gfxPoint3D
|
||||
#include "CompositableTransactionParent.h" // for EditReplyVector
|
||||
#include "ShadowLayersManager.h" // for ShadowLayersManager
|
||||
#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc
|
||||
#include "mozilla/gfx/BasePoint3D.h" // for BasePoint3D
|
||||
#include "mozilla/layers/CanvasLayerComposite.h"
|
||||
#include "mozilla/layers/ColorLayerComposite.h"
|
||||
@ -519,7 +518,10 @@ LayerTransactionParent::RecvUpdate(const InfallibleTArray<Edit>& cset,
|
||||
case Edit::TOpAttachAsyncCompositable: {
|
||||
const OpAttachAsyncCompositable& op = edit.get_OpAttachAsyncCompositable();
|
||||
CompositableParent* compositableParent = CompositableMap::Get(op.containerID());
|
||||
MOZ_ASSERT(compositableParent, "CompositableParent not found in the map");
|
||||
if (!compositableParent) {
|
||||
NS_ERROR("CompositableParent not found in the map");
|
||||
return false;
|
||||
}
|
||||
if (!Attach(cast(op.layerParent()), compositableParent, true)) {
|
||||
return false;
|
||||
}
|
||||
@ -708,7 +710,9 @@ LayerTransactionParent::Attach(ShadowLayerParent* aLayerParent,
|
||||
= static_cast<LayerManagerComposite*>(aLayerParent->AsLayer()->Manager())->GetCompositor();
|
||||
|
||||
CompositableHost* compositable = aCompositable->GetCompositableHost();
|
||||
MOZ_ASSERT(compositable);
|
||||
if (!compositable) {
|
||||
return false;
|
||||
}
|
||||
if (!layer->SetCompositableHost(compositable)) {
|
||||
// not all layer types accept a compositable, see bug 967824
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user