зеркало из https://github.com/mozilla/gecko-dev.git
Bug 754572 - add option to use fatal assertions in NS_CheckThreadSafe, use it in nsBaseScreen and nsScreenManagerAndroid - r=bsmedberg
This commit is contained in:
Родитель
72a25f630d
Коммит
e3783dda32
|
@ -3,6 +3,8 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#define MOZ_FATAL_ASSERTIONS_FOR_THREAD_SAFETY
|
||||
|
||||
#include "nsScreenManagerAndroid.h"
|
||||
#include "nsWindow.h"
|
||||
#include "AndroidBridge.h"
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#define MOZ_FATAL_ASSERTIONS_FOR_THREAD_SAFETY
|
||||
|
||||
#include "nsBaseScreen.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsBaseScreen, nsIScreen)
|
||||
|
|
|
@ -315,10 +315,13 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
#ifdef XPCOM_GLUE
|
||||
#define NS_CheckThreadSafe(owningThread, msg)
|
||||
#define NS_CheckThreadSafe(owningThread, msg)
|
||||
#elif defined MOZ_FATAL_ASSERTIONS_FOR_THREAD_SAFETY
|
||||
#define NS_CheckThreadSafe(owningThread, msg) \
|
||||
NS_ABORT_IF_FALSE(owningThread == PR_GetCurrentThread(), msg)
|
||||
#else
|
||||
#define NS_CheckThreadSafe(owningThread, msg) \
|
||||
NS_ASSERTION(owningThread == PR_GetCurrentThread(), msg)
|
||||
#define NS_CheckThreadSafe(owningThread, msg) \
|
||||
NS_ASSERTION(owningThread == PR_GetCurrentThread(), msg)
|
||||
#endif
|
||||
|
||||
/* When compiling the XPCOM Glue on Windows, we pretend that it's going to
|
||||
|
|
Загрузка…
Ссылка в новой задаче