Backed out changeset 3eb2ceb66ec5 (bug 1304195) for static build bustage

This commit is contained in:
Carsten "Tomcat" Book 2016-09-27 16:56:20 +02:00
Родитель 7505d76cd1
Коммит ea2599961b
3 изменённых файлов: 7 добавлений и 21 удалений

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

@ -823,7 +823,7 @@ GLContextGLX::CreateGLContext(CreateContextFlags flags, const SurfaceCaps& caps,
RefPtr<GLContextGLX> glContext;
bool error;
OffMainThreadScopedXErrorHandler xErrorHandler;
ScopedXErrorHandler xErrorHandler;
do {
error = false;
@ -1311,7 +1311,7 @@ CreateOffscreenPixmapContext(CreateContextFlags flags, const IntSize& size,
int depth;
FindVisualAndDepth(display, visid, &visual, &depth);
OffMainThreadScopedXErrorHandler xErrorHandler;
ScopedXErrorHandler xErrorHandler;
bool error = false;
Drawable drawable;

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

@ -57,15 +57,13 @@ ScopedXErrorHandler::ErrorHandler(Display *, XErrorEvent *ev)
return 0;
}
ScopedXErrorHandler::ScopedXErrorHandler(bool aAllowOffMainThread)
ScopedXErrorHandler::ScopedXErrorHandler()
{
if (!aAllowOffMainThread) {
// Off main thread usage is not safe in general, but OMTC GL layers uses this
// with the main thread blocked, which makes it safe.
NS_WARNING_ASSERTION(
// Off main thread usage is not safe in general, but OMTC GL layers uses this
// with the main thread blocked, which makes it safe.
NS_WARNING_ASSERTION(
NS_IsMainThread(),
"ScopedXErrorHandler being called off main thread, may cause issues");
}
// let sXErrorPtr point to this object's mXError object, but don't reset this mXError object!
// think of the case of nested ScopedXErrorHandler's.
mOldXErrorPtr = sXErrorPtr;

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

@ -118,10 +118,7 @@ public:
static int
ErrorHandler(Display *, XErrorEvent *ev);
/**
* @param aAllowOffMainThread whether to warn if used off main thread
*/
ScopedXErrorHandler(bool aAllowOffMainThread = false);
ScopedXErrorHandler();
~ScopedXErrorHandler();
@ -134,15 +131,6 @@ public:
bool SyncAndGetError(Display *dpy, XErrorEvent *ev = nullptr);
};
class OffMainThreadScopedXErrorHandler : public ScopedXErrorHandler
{
public:
OffMainThreadScopedXErrorHandler()
: ScopedXErrorHandler(true)
{
}
};
} // namespace mozilla
#endif // mozilla_X11Util_h