Index: compiled/String.h
===================================================================
--- a/compiled/String.h
+++ b/compiled/String.h
@@ -260,17 +260,17 @@
 inline DependentString operator "" _str(const String::value_type* str,
     String::size_type len)
 {
   return DependentString(str, len);
 }
 
 inline void String_assert_writable(bool isWritable)
 {
-  assert(isWritable, u"Writing access to a read-only string"_str);
+  assert2(isWritable, u"Writing access to a read-only string"_str);
 }
 
 class OwnedString : public String
 {
 private:
   void grow(size_type additionalSize)
   {
     OwnedString newValue(length() + additionalSize);
@@ -343,28 +343,28 @@
     return *this;
   }
 
   void append(const value_type* source, size_type sourceLen)
   {
     if (!sourceLen)
       return;
 
-    assert(source, u"Null buffer passed to OwnedString.append()"_str);
+    assert2(source, u"Null buffer passed to OwnedString.append()"_str);
     size_t oldLength = length();
     grow(sourceLen);
     std::memcpy(mBuf + oldLength, source, sizeof(value_type) * sourceLen);
   }
 
   void append(const char* source, size_type sourceLen)
   {
     if (!sourceLen)
       return;
 
-    assert(source, u"Null buffer passed to OwnedString.append()"_str);
+    assert2(source, u"Null buffer passed to OwnedString.append()"_str);
     size_t oldLength = length();
     grow(sourceLen);
     for (size_t i = 0; i < sourceLen; i++)
       mBuf[oldLength + i] = source[i];
   }
 
   void append(const String& str)
   {
Index: compiled/StringMap.h
===================================================================
--- a/compiled/StringMap.h
+++ b/compiled/StringMap.h
@@ -288,19 +288,19 @@
       mInsertCounter = mMap->mInsertCounter;
       mHash = mMap->hash(key);
 #endif
     }
 
     void assign(const String& key, const T& value)
     {
 #if defined(DEBUG)
-      assert(mInsertCounter == mMap->mInsertCounter,
+      assert2(mInsertCounter == mMap->mInsertCounter,
           u"There should be no insert operations performed between map.find() and assign()"_str);
-      assert(mHash == mMap->hash(key),
+      assert2(mHash == mMap->hash(key),
           u"The keys used in map.find() and assign() should be identical"_str);
 #endif
 
       mMap->assign(this->mEntry, entry_type(key, value));
     }
   };
 }
 
Index: compiled/debug.h
===================================================================
--- a/compiled/debug.h
+++ b/compiled/debug.h
@@ -14,20 +14,16 @@
  * You should have received a copy of the GNU General Public License
  * along with Adblock Plus.  If not, see <http://www.gnu.org/licenses/>.
  */
 
 #pragma once
 
 #include "library.h"
 
-#if defined(assert)
-#undef assert
-#endif
-
 class String;
 
 struct console_type
 {
   static void log(const String& str)
   {
     LogString(str);
   }
@@ -46,23 +42,23 @@
   {
     LogError(str);
   }
 };
 
 static console_type console;
 
 #if defined(DEBUG)
-inline void assert(bool condition, const String& str)
+inline void assert2(bool condition, const String& str)
 {
   if (!condition)
     console.error(str);
 }
 #else
-#define assert(condition, str)
+#define assert2(condition, str)
 #endif
 
 #if defined(__EMSCRIPTEN_TRACING__)
 #include <emscripten/trace.h>
 
 inline void init_tracing()
 {
   emscripten_trace_configure("http://127.0.0.1:5000/", "MyApplication");
Index: compiled/intrusive_ptr.h
===================================================================
--- a/compiled/intrusive_ptr.h
+++ b/compiled/intrusive_ptr.h
@@ -35,30 +35,30 @@
 public:
   void AddRef()
   {
     mRefCount++;
   }
 
   void ReleaseRef()
   {
-    assert(mRefCount > 0, u"Unexpected zero or negative reference count"_str);
+    assert2(mRefCount > 0, u"Unexpected zero or negative reference count"_str);
     if (--mRefCount == 0)
       delete this;
   }
 
 protected:
   ref_counted()
       : mRefCount(1)
   {
   }
 
   virtual ~ref_counted()
   {
-    assert(mRefCount == 0, u"Destroying a ref-counted object with a non-zero reference count"_str);
+    assert2(mRefCount == 0, u"Destroying a ref-counted object with a non-zero reference count"_str);
   }
 
 private:
   int mRefCount;
 };
 
 template<typename T,
     class = typename std::enable_if<std::is_base_of<ref_counted,T>::value>::type>
Index: compiled/storage/FilterStorage.cpp
===================================================================
--- a/compiled/storage/FilterStorage.cpp
+++ b/compiled/storage/FilterStorage.cpp
@@ -107,17 +107,17 @@
   );
   return true;
 }
 
 bool FilterStorage::MoveSubscription(Subscription& subscription,
                                      const Subscription* insertBefore)
 {
   int oldPos = IndexOfSubscription(subscription);
-  assert(oldPos >= 0, u"Attempt to move a subscription that is not in the list"_str);
+  assert2(oldPos >= 0, u"Attempt to move a subscription that is not in the list"_str);
   if (oldPos == -1)
     return false;
 
   int newPos = -1;
   if (insertBefore)
     newPos = IndexOfSubscription(*insertBefore);
   if (newPos == -1)
     newPos = mSubscriptions.size();
Index: compiled/subscription/UserDefinedSubscription.cpp
===================================================================
--- a/compiled/subscription/UserDefinedSubscription.cpp
+++ b/compiled/subscription/UserDefinedSubscription.cpp
@@ -51,27 +51,27 @@
     : Subscription(Type::USERDEFINED, id), mDefaults(0)
 {
 }
 
 bool UserDefinedSubscription::IsDefaultFor(const Filter& filter) const
 {
   if (filter.mType >= Filter::Type::VALUE_COUNT)
   {
-    assert(false, "Filter type exceeds valid range");
+    assert2(false, "Filter type exceeds valid range");
     abort();
   }
   return mDefaults & filterTypeToCategory[filter.mType];
 }
 
 void UserDefinedSubscription::MakeDefaultFor(const Filter& filter)
 {
   if (filter.mType >= Filter::Type::VALUE_COUNT)
   {
-    assert(false, "Filter type exceeds valid range");
+    assert2(false, "Filter type exceeds valid range");
     abort();
   }
   mDefaults |= filterTypeToCategory[filter.mType];
 }
 
 void UserDefinedSubscription::InsertFilterAt(Filter& filter, unsigned pos)
 {
   if (pos >= mFilters.size())
