From 02ad55af2213993d0bae3a8578086ab36e0c3479 Mon Sep 17 00:00:00 2001 From: Kyle Machulis Date: Wed, 30 Jul 2014 17:30:19 -0700 Subject: [PATCH] Bug 1045752 - Change ScopedXErrorHandler assert to warn; r=karlt --- gfx/src/X11Util.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gfx/src/X11Util.cpp b/gfx/src/X11Util.cpp index 8cdf145e45be..dd1f025d4d96 100644 --- a/gfx/src/X11Util.cpp +++ b/gfx/src/X11Util.cpp @@ -59,7 +59,9 @@ ScopedXErrorHandler::ErrorHandler(Display *, XErrorEvent *ev) ScopedXErrorHandler::ScopedXErrorHandler() { - MOZ_ASSERT(NS_IsMainThread()); + // 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_WARN_IF_FALSE(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;