mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 774388 - Patch 13: Temporarily addref to prevent destruction during handling of sync Stop message, to avoid triggering the 'mismatched CxxStackFrames' assertion of MessageChannel - r=nical
This commit is contained in:
parent
c741cc162f
commit
809ef59398
@ -172,10 +172,25 @@ bool ImageBridgeParent::RecvWillStop()
|
||||
return true;
|
||||
}
|
||||
|
||||
static void
|
||||
ReleaseImageBridgeParent(ImageBridgeParent* aImageBridgeParent)
|
||||
{
|
||||
aImageBridgeParent->Release();
|
||||
}
|
||||
|
||||
bool ImageBridgeParent::RecvStop()
|
||||
{
|
||||
// Nothing to do. This message just serves as synchronization between the
|
||||
// This message just serves as synchronization between the
|
||||
// child and parent threads during shutdown.
|
||||
|
||||
// There is one thing that we need to do here: temporarily addref, so that
|
||||
// the handling of this sync message can't race with the destruction of
|
||||
// the ImageBridgeParent, which would trigger the dreaded "mismatched CxxStackFrames"
|
||||
// assertion of MessageChannel.
|
||||
AddRef();
|
||||
MessageLoop::current()->PostTask(
|
||||
FROM_HERE,
|
||||
NewRunnableFunction(&ReleaseImageBridgeParent, this));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user