зеркало из https://github.com/mozilla/gecko-dev.git
Bug 344023. Clamp offscreen buffer size to avoid crashes on huge windows. r+sr=roc
This commit is contained in:
Родитель
eabe3c9a01
Коммит
79cfeea849
|
@ -2213,6 +2213,11 @@ nsWindow::OnExposeEvent(GtkWidget *aWidget, GdkEventExpose *aEvent)
|
|||
depth = gdk_drawable_get_depth(GDK_DRAWABLE(mDrawingarea->inner_window));
|
||||
}
|
||||
|
||||
// Make sure we won't create something that will overload the X server
|
||||
nsSize safeSize = GetSafeWindowSize(boundsRect.Size());
|
||||
boundsRect.width = safeSize.width;
|
||||
boundsRect.height = safeSize.height;
|
||||
|
||||
if (!gUseBufferPixmap ||
|
||||
boundsRect.width > gBufferPixmapMaxSize.width ||
|
||||
boundsRect.height > gBufferPixmapMaxSize.height)
|
||||
|
|
Загрузка…
Ссылка в новой задаче