mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1156182 - Prevent widgets from creating a LayerManager during shutdown. r=sotaro
This commit is contained in:
parent
82916146d1
commit
01b1e6af97
@ -6542,6 +6542,11 @@ nsWindow::GetLayerManager(PLayerTransactionChild* aShadowManager,
|
|||||||
LayerManagerPersistence aPersistence,
|
LayerManagerPersistence aPersistence,
|
||||||
bool* aAllowRetaining)
|
bool* aAllowRetaining)
|
||||||
{
|
{
|
||||||
|
if (mIsDestroyed) {
|
||||||
|
// Prevent external code from triggering the re-creation of the LayerManager/Compositor
|
||||||
|
// during shutdown. Just return what we currently have, which is most likely null.
|
||||||
|
return mLayerManager;
|
||||||
|
}
|
||||||
if (!mLayerManager && eTransparencyTransparent == GetTransparencyMode()) {
|
if (!mLayerManager && eTransparencyTransparent == GetTransparencyMode()) {
|
||||||
mLayerManager = CreateBasicLayerManager();
|
mLayerManager = CreateBasicLayerManager();
|
||||||
}
|
}
|
||||||
|
@ -1146,6 +1146,10 @@ LayerManager* nsBaseWidget::GetLayerManager(PLayerTransactionChild* aShadowManag
|
|||||||
bool* aAllowRetaining)
|
bool* aAllowRetaining)
|
||||||
{
|
{
|
||||||
if (!mLayerManager) {
|
if (!mLayerManager) {
|
||||||
|
if (!mShutdownObserver) {
|
||||||
|
// We are shutting down, do not try to re-create a LayerManager
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
// Try to use an async compositor first, if possible
|
// Try to use an async compositor first, if possible
|
||||||
if (ShouldUseOffMainThreadCompositing()) {
|
if (ShouldUseOffMainThreadCompositing()) {
|
||||||
// e10s uses the parameter to pass in the shadow manager from the TabChild
|
// e10s uses the parameter to pass in the shadow manager from the TabChild
|
||||||
|
Loading…
Reference in New Issue
Block a user