mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1221418 - A better cleanup method for AsmJSCache::ChildRunnable, r=janv
This commit is contained in:
parent
d0a775fa30
commit
b25fa28709
@ -1271,6 +1271,13 @@ public:
|
||||
return JS::AsmJSCache_Success;
|
||||
}
|
||||
|
||||
void Cleanup()
|
||||
{
|
||||
#ifdef DEBUG
|
||||
NoteActorDestroyed();
|
||||
#endif
|
||||
}
|
||||
|
||||
private:
|
||||
~ChildRunnable()
|
||||
{
|
||||
@ -1329,7 +1336,7 @@ private:
|
||||
ActorDestroy(ActorDestroyReason why) override
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
mActorDestroyed = true;
|
||||
NoteActorDestroyed();
|
||||
}
|
||||
|
||||
void
|
||||
@ -1368,6 +1375,11 @@ private:
|
||||
mCondVar.Notify();
|
||||
}
|
||||
|
||||
void NoteActorDestroyed()
|
||||
{
|
||||
mActorDestroyed = true;
|
||||
}
|
||||
|
||||
nsIPrincipal* const mPrincipal;
|
||||
nsAutoPtr<PrincipalInfo> mPrincipalInfo;
|
||||
WriteParams mWriteParams;
|
||||
@ -1553,6 +1565,7 @@ OpenFile(nsIPrincipal* aPrincipal,
|
||||
JS::AsmJSCacheResult openResult =
|
||||
childRunnable->BlockUntilOpen(aChildRunnable);
|
||||
if (openResult != JS::AsmJSCache_Success) {
|
||||
childRunnable->Cleanup();
|
||||
return openResult;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user