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
4097799950
commit
9a3ef0e44c
@ -122,12 +122,22 @@ public:
|
||||
void
|
||||
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
|
||||
_ProcLoaderParentDestroy(PProcLoaderParent *aLoader)
|
||||
{
|
||||
aLoader->Close();
|
||||
delete aLoader;
|
||||
sProcLoaderClientOnDeinit = false;
|
||||
}
|
||||
@ -136,7 +146,6 @@ bool
|
||||
ProcLoaderParent::RecvLoadComplete(const int32_t &aPid,
|
||||
const int32_t &aCookie)
|
||||
{
|
||||
ProcLoaderClientDeinit();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user