summaryrefslogtreecommitdiff
path: root/gfx
diff options
context:
space:
mode:
authorPale Moon <git-repo@palemoon.org>2017-05-28 13:03:03 +0200
committerPale Moon <git-repo@palemoon.org>2017-05-28 13:03:03 +0200
commit25190ad4c57c219f8cd7971763e95338ee4f62b6 (patch)
tree3bb7edb5fed18a93ba3d81484fc313e3ffe8c9d8 /gfx
parent5bf4cffd8497eb4ef0b14ce80de06b89c76aac52 (diff)
downloadpalemoon-gre-25190ad4c57c219f8cd7971763e95338ee4f62b6.tar.gz
Fix a crash on about:support with browser windows without a layer manager.
This fixes a problem where windowless browsers would cause a deliberate crash because the enum value checks to get the name were incomplete, falling through to a runtime abort. This resolves #1120.
Diffstat (limited to 'gfx')
-rw-r--r--gfx/layers/client/ClientLayerManager.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/gfx/layers/client/ClientLayerManager.cpp b/gfx/layers/client/ClientLayerManager.cpp
index 8c1a90389..c63abf02a 100644
--- a/gfx/layers/client/ClientLayerManager.cpp
+++ b/gfx/layers/client/ClientLayerManager.cpp
@@ -750,6 +750,7 @@ void
ClientLayerManager::GetBackendName(nsAString& aName)
{
switch (mForwarder->GetCompositorBackendType()) {
+ case LayersBackend::LAYERS_NONE: aName.AssignLiteral("None"); return;
case LayersBackend::LAYERS_BASIC: aName.AssignLiteral("Basic"); return;
case LayersBackend::LAYERS_OPENGL: aName.AssignLiteral("OpenGL"); return;
case LayersBackend::LAYERS_D3D9: aName.AssignLiteral("Direct3D 9"); return;
@@ -764,6 +765,8 @@ ClientLayerManager::GetBackendName(nsAString& aName)
#endif
return;
}
+ case LayersBackend::LAYERS_CLIENT:
+ case LayersBackend::LAYERS_LAST: aName.AssignLiteral("Reserved"); return;
default: NS_RUNTIMEABORT("Invalid backend");
}
}