зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 3eb2ceb66ec5 (bug 1304195) for static build bustage
This commit is contained in:
Родитель
7505d76cd1
Коммит
ea2599961b
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче