Bug 808262- Otoro/unagi sometimes start up in landscape and can't be switched to portrait. The working theory is that, for some reason, we can not access the fb. If that happens, just abort and try again later. r=dhylands a=blocking-basecamp

This commit is contained in:
Doug Turner 2012-12-07 16:02:48 -08:00
Родитель b90f244f8b
Коммит a27514f324
2 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -133,7 +133,7 @@ Open()
bool
GetSize(nsIntSize *aScreenSize) {
// If the framebuffer has been opened, we should always have the size.
if (0 <= sFd || sScreenSize) {
if (sScreenSize) {
*aScreenSize = *sScreenSize;
return true;
}

Просмотреть файл

@ -151,8 +151,10 @@ nsWindow::nsWindow()
}
nsIntSize screenSize;
mozilla::DebugOnly<bool> gotFB = Framebuffer::GetSize(&screenSize);
MOZ_ASSERT(gotFB);
bool gotFB = Framebuffer::GetSize(&screenSize);
if (!gotFB) {
NS_RUNTIMEABORT("Failed to get size from framebuffer, aborting...");
}
gScreenBounds = nsIntRect(nsIntPoint(0, 0), screenSize);
char propValue[PROPERTY_VALUE_MAX];