Kaydet (Commit) 995073b0 authored tarafından Timothy Markle's avatar Timothy Markle Kaydeden (comit) Caolán McNamara

fdo#43157 - Clean up OSL_ASSERT

Changed OSL_ASSERT to SAL_WARN_IF

Change-Id: I6f81a265aefe769e1449b1f10c796bf3aa1d0f1c
üst 1b5beba7
...@@ -71,7 +71,7 @@ UnsafeBridge::~UnsafeBridge(void) ...@@ -71,7 +71,7 @@ UnsafeBridge::~UnsafeBridge(void)
{ {
LOG_LIFECYCLE_UnsafeBridge_emit(fprintf(stderr, "LIFE: %s -> %p\n", "UnsafeBridge::~UnsafeBridge(void)", this)); LOG_LIFECYCLE_UnsafeBridge_emit(fprintf(stderr, "LIFE: %s -> %p\n", "UnsafeBridge::~UnsafeBridge(void)", this));
OSL_ASSERT(m_count >= 0); SAL_WARN_IF(m_count < 0, "cppu.unsafebridge", "m_count is less than 0");
} }
void UnsafeBridge::v_callInto_v(uno_EnvCallee * pCallee, va_list * pParam) void UnsafeBridge::v_callInto_v(uno_EnvCallee * pCallee, va_list * pParam)
...@@ -83,7 +83,7 @@ void UnsafeBridge::v_callInto_v(uno_EnvCallee * pCallee, va_list * pParam) ...@@ -83,7 +83,7 @@ void UnsafeBridge::v_callInto_v(uno_EnvCallee * pCallee, va_list * pParam)
void UnsafeBridge::v_callOut_v(uno_EnvCallee * pCallee, va_list * pParam) void UnsafeBridge::v_callOut_v(uno_EnvCallee * pCallee, va_list * pParam)
{ {
OSL_ASSERT(m_count > 0); SAL_WARN_IF(m_count <= 0, "cppu.unsafebridge", "m_count is less than or equal to 0");
-- m_count; -- m_count;
pCallee(pParam); pCallee(pParam);
...@@ -97,7 +97,7 @@ void UnsafeBridge::v_enter(void) ...@@ -97,7 +97,7 @@ void UnsafeBridge::v_enter(void)
{ {
m_mutex.acquire(); m_mutex.acquire();
OSL_ASSERT(m_count >= 0); SAL_WARN_IF(m_count < 0, "cppu.unsafebridge", "m_count is less than 0");
if (m_count == 0) if (m_count == 0)
m_threadId = osl::Thread::getCurrentIdentifier(); m_threadId = osl::Thread::getCurrentIdentifier();
...@@ -107,7 +107,7 @@ void UnsafeBridge::v_enter(void) ...@@ -107,7 +107,7 @@ void UnsafeBridge::v_enter(void)
void UnsafeBridge::v_leave(void) void UnsafeBridge::v_leave(void)
{ {
OSL_ASSERT(m_count > 0); SAL_WARN_IF(m_count <= 0, "cppu.unsafebridge", "m_count is less than or equal to 0");
-- m_count; -- m_count;
if (!m_count) if (!m_count)
......
...@@ -80,6 +80,11 @@ certain functionality. ...@@ -80,6 +80,11 @@ certain functionality.
@li @c comphelper @li @c comphelper
@li @c comphelper.container @li @c comphelper.container
@section cppu
@li @c cppu
@li @c cppu.unsafebridge
@section cppuhelper @section cppuhelper
@li @c cppuhelper @li @c cppuhelper
...@@ -437,7 +442,6 @@ certain functionality. ...@@ -437,7 +442,6 @@ certain functionality.
@li @c configmgr @li @c configmgr
@li @c cppcanvas @li @c cppcanvas
@li @c cppcanvas.emf @li @c cppcanvas.emf
@li @c cppu
@li @c helpcompiler @li @c helpcompiler
@li @c linguistic @li @c linguistic
@li @c oox @li @c oox
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment