mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
b=1043772 assert ScopedXErrorHandler is used only on main thread r=nical
--HG-- extra : rebase_source : 737a78cabe0cb9a44786cd562cc1e34bafd7a2a0
This commit is contained in:
parent
2e82992cee
commit
54c40af7e1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user