Index: /trunk/src/VBox/Main/include/VirtualBoxBase.h
===================================================================
--- /trunk/src/VBox/Main/include/VirtualBoxBase.h	(revision 55944)
+++ /trunk/src/VBox/Main/include/VirtualBoxBase.h	(revision 55945)
@@ -156,17 +156,16 @@
  *  @param   expr    Expression which should be true.
  */
-#if defined(DEBUG)
-# define ComAssert(expr)    Assert(expr)
-#else
-# define ComAssert(expr) \
+#define ComAssert(expr) \
     do { \
         if (RT_LIKELY(!!(expr))) \
         { /* likely */ } \
         else \
+        { \
+            AssertMsgFailed(("%s\n", #expr)); \
             setError(E_FAIL, \
                      "Assertion failed: [%s] at '%s' (%d) in %s.\nPlease contact the product vendor!", \
                      #expr, __FILE__, __LINE__, __PRETTY_FUNCTION__); \
-    } while (0)
-#endif
+        } \
+    } while (0)
 
 /**
@@ -181,14 +180,11 @@
  *
  */
-#if defined(DEBUG)
-# define ComAssertFailed()  AssertFailed()
-#else
-# define ComAssertFailed() \
-    do { \
+#define ComAssertFailed() \
+    do { \
+        AssertFailed(); \
         setError(E_FAIL, \
                  "Assertion failed: at '%s' (%d) in %s.\nPlease contact the product vendor!", \
                  __FILE__, __LINE__, __PRETTY_FUNCTION__); \
     } while (0)
-#endif
 
 /**
@@ -201,17 +197,17 @@
  *  @param   a       printf argument list (in parenthesis).
  */
-#if defined(DEBUG)
-# define ComAssertMsg(expr, a) AssertMsg(expr, a)
-#else
-# define ComAssertMsg(expr, a) \
+#define ComAssertMsg(expr, a) \
     do { \
         if (RT_LIKELY(!!(expr))) \
         { /* likely */ } \
         else \
+        { \
+            Utf8StrFmt MyAssertMsg a; /* may throw bad_alloc */ \
+            AssertMsgFailed(("%s\n", MyAssertMsg.c_str())); \
             setError(E_FAIL, \
                      "Assertion failed: [%s] at '%s' (%d) in %s.\n%s.\nPlease contact the product vendor!", \
-                     #expr, __FILE__, __LINE__, __PRETTY_FUNCTION__, Utf8StrFmt a .c_str()); \
-    } while (0)
-#endif
+                     #expr, __FILE__, __LINE__, __PRETTY_FUNCTION__, MyAssertMsg.c_str()); \
+        } \
+    } while (0)
 
 /**
@@ -223,14 +219,12 @@
  *  @param   a       printf argument list (in parenthesis).
  */
-#if defined(DEBUG)
-# define ComAssertMsgFailed(a)  AssertMsgFailed(a)
-#else
-# define ComAssertMsgFailed(a) \
-    do { \
+#define ComAssertMsgFailed(a) \
+    do { \
+        Utf8StrFmt MyAssertMsg a; /* may throw bad_alloc */ \
+        AssertMsgFailed(("%s\n", MyAssertMsg.c_str())); \
         setError(E_FAIL, \
                  "Assertion failed: at '%s' (%d) in %s.\n%s.\nPlease contact the product vendor!", \
-                 __FILE__, __LINE__, __PRETTY_FUNCTION__, Utf8StrFmt a .c_str()); \
-    } while (0)
-#endif
+                 __FILE__, __LINE__, __PRETTY_FUNCTION__, MyAssertMsg.c_str()); \
+    } while (0)
 
 /**
@@ -242,9 +236,5 @@
  * @param   vrc     VBox status code.
  */
-#if defined(DEBUG)
-# define ComAssertRC(vrc)   AssertRC(vrc)
-#else
-# define ComAssertRC(vrc)   ComAssertMsgRC(vrc, ("%Rra", vrc))
-#endif
+#define ComAssertRC(vrc)            ComAssertMsgRC(vrc, ("%Rra", vrc))
 
 /**
@@ -257,9 +247,5 @@
  *  @param   msg    printf argument list (in parenthesis).
  */
-#if defined(DEBUG)
-# define ComAssertMsgRC(vrc, msg)   AssertMsgRC(vrc, msg)
-#else
-# define ComAssertMsgRC(vrc, msg)   ComAssertMsg(RT_SUCCESS(vrc), msg)
-#endif
+#define ComAssertMsgRC(vrc, msg)    ComAssertMsg(RT_SUCCESS(vrc), msg)
 
 /**
@@ -269,11 +255,7 @@
  *  See ComAssert for more info.
  *
- *  @param rc   COM result code
- */
-#if defined(DEBUG)
-# define ComAssertComRC(rc) AssertComRC(rc)
-#else
-# define ComAssertComRC(rc) ComAssertMsg(SUCCEEDED(rc), ("COM RC = %Rhrc (0x%08X)", (rc), (rc)))
-#endif
+ *  @param hrc  COM result code
+ */
+#define ComAssertComRC(hrc)         ComAssertMsg(SUCCEEDED(hrc), ("COM RC=%Rhrc (0x%08X)", (hrc), (hrc)))
 
 
@@ -565,5 +547,5 @@
         RTAssertDebugBreak(); \
         throw (a); \
-} while (0)
+    } while (0)
 #else
 # define DebugBreakThrow(a) throw (a)
