mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
back out bug 1065536 part 2 for maybe causing crashes.
This commit is contained in:
parent
fd4d6496b2
commit
ae9c0ad9f2
@ -96,6 +96,7 @@ CompositorChild::Create(Transport* aTransport, ProcessId aOtherProcess)
|
|||||||
sCompositor->SendGetTileSize(&width, &height);
|
sCompositor->SendGetTileSize(&width, &height);
|
||||||
gfxPlatform::GetPlatform()->SetTileSize(width, height);
|
gfxPlatform::GetPlatform()->SetTileSize(width, height);
|
||||||
|
|
||||||
|
// We release this ref in ActorDestroy().
|
||||||
return sCompositor;
|
return sCompositor;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,13 +181,14 @@ CompositorChild::ActorDestroy(ActorDestroyReason aWhy)
|
|||||||
NS_RUNTIMEABORT("ActorDestroy by IPC channel failure at CompositorChild");
|
NS_RUNTIMEABORT("ActorDestroy by IPC channel failure at CompositorChild");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
if (sCompositor) {
|
||||||
|
sCompositor->Release();
|
||||||
|
sCompositor = nullptr;
|
||||||
|
}
|
||||||
// We don't want to release the ref to sCompositor here, during
|
// We don't want to release the ref to sCompositor here, during
|
||||||
// cleanup, because that will cause it to be deleted while it's
|
// cleanup, because that will cause it to be deleted while it's
|
||||||
// still being used. So defer the deletion to after it's not in
|
// still being used. So defer the deletion to after it's not in
|
||||||
// use.
|
// use.
|
||||||
sCompositor = nullptr;
|
|
||||||
|
|
||||||
MessageLoop::current()->PostTask(
|
MessageLoop::current()->PostTask(
|
||||||
FROM_HERE,
|
FROM_HERE,
|
||||||
NewRunnableMethod(this, &CompositorChild::Release));
|
NewRunnableMethod(this, &CompositorChild::Release));
|
||||||
|
Loading…
Reference in New Issue
Block a user