Bug 1137875 - Have the LayerTransactionChild hold a copy of the layers id. r=nical

This commit is contained in:
Kartikaya Gupta 2015-03-06 06:25:33 -05:00
parent 93130eb171
commit 282fe7260a
2 changed files with 6 additions and 2 deletions

View File

@ -121,7 +121,7 @@ CompositorChild::AllocPLayerTransactionChild(const nsTArray<LayersBackend>& aBac
bool*)
{
MOZ_ASSERT(mCanSend);
LayerTransactionChild* c = new LayerTransactionChild();
LayerTransactionChild* c = new LayerTransactionChild(aId);
c->AddIPDLReference();
return c;
}

View File

@ -51,11 +51,14 @@ public:
PTextureChild* aTexture,
const FenceHandle& aFence);
uint64_t GetId() const { return mId; }
protected:
LayerTransactionChild()
explicit LayerTransactionChild(const uint64_t& aId)
: mForwarder(nullptr)
, mIPCOpen(false)
, mDestroyed(false)
, mId(aId)
{}
~LayerTransactionChild() { }
@ -90,6 +93,7 @@ protected:
ShadowLayerForwarder* mForwarder;
bool mIPCOpen;
bool mDestroyed;
uint64_t mId;
};
} // namespace layers