summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2012-01-11 14:53:21 +0000
committerSteve Block <steveblock@google.com>2012-01-11 14:55:03 +0000
commite65004065e90be33dd07d0156623c0777e0cb24d (patch)
treed9fd29aef33a6e77e266da865f794726b375f829
parentb5d45884a4667607ed1414aa0d0fdfa24dbea4e5 (diff)
downloadexternal_webkit-e65004065e90be33dd07d0156623c0777e0cb24d.zip
external_webkit-e65004065e90be33dd07d0156623c0777e0cb24d.tar.gz
external_webkit-e65004065e90be33dd07d0156623c0777e0cb24d.tar.bz2
Simplify workaround for LOG_ASSERT conflict
Change-Id: Id96b88951fb574a7ab67bd8c5a310d4770111d0e
-rw-r--r--Source/WebKit/android/WebCoreSupport/ChromiumIncludes.h25
1 files changed, 6 insertions, 19 deletions
diff --git a/Source/WebKit/android/WebCoreSupport/ChromiumIncludes.h b/Source/WebKit/android/WebCoreSupport/ChromiumIncludes.h
index 6d9feb6..e720de2 100644
--- a/Source/WebKit/android/WebCoreSupport/ChromiumIncludes.h
+++ b/Source/WebKit/android/WebCoreSupport/ChromiumIncludes.h
@@ -31,11 +31,6 @@
#include "config.h"
-// Include log.h before any Chromium headers to make sure we pick up
-// ALOG_ASSERT and LOG_ASSERT (if present).
-// TODO: Remove this once LOG_ASSERT is removed from the framework in AOSP.
-#include <cutils/log.h>
-
// Undefine LOG before including chrome code, and if it was defined attempt to
// set the macro to the Android logging macro (which is the only one that
// actually logs).
@@ -46,14 +41,14 @@
#endif
// In AOSP, the framework still uses LOG_ASSERT (as well as ALOG_ASSERT), which
-// conflicts with Chromium's LOG_ASSERT. So if defined, we undefine LOG_ASSERT
-// before including Chromium code, then afterwards define it back to the
-// framework macro.
+// conflicts with Chromium's LOG_ASSERT. So we undefine LOG_ASSERT to allow the
+// Chromium implementation to be picked up. We also redefine ALOG_ASSERT to the
+// underlying framework implementation without using LOG_ASSERT.
// TODO: Remove this once LOG_ASSERT is removed from the framework in AOSP.
-#ifdef LOG_ASSERT
-#define LOG_ASSERT_WAS_DEFINED
#undef LOG_ASSERT
-#endif
+#undef ALOG_ASSERT
+// Copied from log.h.
+#define ALOG_ASSERT(cond, ...) LOG_FATAL_IF(!(cond), ## __VA_ARGS__)
// Chromium won't build without NDEBUG set, so we set it for all source files
// that use Chromium code. This means that if NDEBUG was previously unset, we
@@ -125,12 +120,4 @@
#define LOG(priority, tag, ...) LOG_PRI(ANDROID_##priority, tag, __VA_ARGS__)
#endif
-// If LOG_ASSERT was defined, restore it to the framework macro.
-// TODO: Remove this once LOG_ASSERT is removed from the framework in AOSP.
-#ifdef LOG_ASSERT_WAS_DEFINED
-#undef LOG_ASSERT
-// Copied from log.h.
-#define LOG_ASSERT(cond, ...) LOG_FATAL_IF(!(cond), ## __VA_ARGS__)
-#endif
-
#endif