diff --git a/gfx/src/X11Util.cpp b/gfx/src/X11Util.cpp index ac9c25958248..8cdf145e45be 100644 --- a/gfx/src/X11Util.cpp +++ b/gfx/src/X11Util.cpp @@ -7,6 +7,7 @@ #include "X11Util.h" #include "nsDebug.h" // for NS_ASSERTION, etc +#include "MainThreadUtils.h" // for NS_IsMainThread namespace mozilla { @@ -58,6 +59,7 @@ ScopedXErrorHandler::ErrorHandler(Display *, XErrorEvent *ev) ScopedXErrorHandler::ScopedXErrorHandler() { + MOZ_ASSERT(NS_IsMainThread()); // 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;