Bug 717658 - OOM crash in BasicLayers: dump sizes to help understand this crash - r=joe

This commit is contained in:
Benoit Jacob 2012-01-24 16:12:30 -05:00
parent 4193b914d8
commit ffc3e7a362

View File

@ -50,6 +50,7 @@
#include "BasicLayers.h"
#include "ImageLayers.h"
#include "prprf.h"
#include "nsTArray.h"
#include "nsGUIEvent.h"
#include "gfxContext.h"
@ -2399,7 +2400,12 @@ BasicShadowableThebesLayer::CreateBuffer(Buffer::ContentType aType,
if (!BasicManager()->AllocBuffer(gfxIntSize(aSize.width, aSize.height),
aType,
&mBackBuffer)) {
NS_RUNTIMEABORT("creating ThebesLayer 'back buffer' failed!");
enum { buflen = 256 };
char buf[buflen];
PR_snprintf(buf, buflen,
"creating ThebesLayer 'back buffer' failed! width=%d, height=%d, type=%x",
aSize.width, aSize.height, int(aType));
NS_RUNTIMEABORT(buf);
}
NS_ABORT_IF_FALSE(!mIsNewBuffer,