mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1048011 - Fix a race condition that causes PProcLoaderParent leak. r=khuey
--HG-- extra : rebase_source : d0230771da1992fab13681c9b5baa585d334d0cc
This commit is contained in:
parent
5bba7ad647
commit
fbb99791d2
@ -122,12 +122,22 @@ public:
|
|||||||
void
|
void
|
||||||
ProcLoaderParent::ActorDestroy(ActorDestroyReason aWhy)
|
ProcLoaderParent::ActorDestroy(ActorDestroyReason aWhy)
|
||||||
{
|
{
|
||||||
|
if (aWhy == AbnormalShutdown) {
|
||||||
|
NS_WARNING("ProcLoaderParent is destroyed abnormally.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sProcLoaderClientOnDeinit) {
|
||||||
|
// Get error for closing while the channel is already error.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Destroy self asynchronously.
|
||||||
|
ProcLoaderClientDeinit();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_ProcLoaderParentDestroy(PProcLoaderParent *aLoader)
|
_ProcLoaderParentDestroy(PProcLoaderParent *aLoader)
|
||||||
{
|
{
|
||||||
aLoader->Close();
|
|
||||||
delete aLoader;
|
delete aLoader;
|
||||||
sProcLoaderClientOnDeinit = false;
|
sProcLoaderClientOnDeinit = false;
|
||||||
}
|
}
|
||||||
@ -136,7 +146,6 @@ bool
|
|||||||
ProcLoaderParent::RecvLoadComplete(const int32_t &aPid,
|
ProcLoaderParent::RecvLoadComplete(const int32_t &aPid,
|
||||||
const int32_t &aCookie)
|
const int32_t &aCookie)
|
||||||
{
|
{
|
||||||
ProcLoaderClientDeinit();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user