Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(974)

Unified Diff: Source/platform/heap/Handle.h

Issue 813883002: replace COMPILE_ASSERT with static_assert in platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: final fixups Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/geometry/Region.cpp ('k') | Source/platform/heap/Heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/Handle.h
diff --git a/Source/platform/heap/Handle.h b/Source/platform/heap/Handle.h
index 7186585a7e09999741ba6d8127370f61657658eb..51ef954fcf5062b8d3ad06bf0e223ce6e7c73e47 100644
--- a/Source/platform/heap/Handle.h
+++ b/Source/platform/heap/Handle.h
@@ -358,7 +358,7 @@ public:
void trace(Visitor* visitor)
{
- COMPILE_ASSERT_IS_GARBAGE_COLLECTED(T, NonGarbageCollectedObjectInPersistent);
+ STATIC_ASSERT_IS_GARBAGE_COLLECTED(T, "non-garbage collected object should not be in Persistent");
#if ENABLE(GC_PROFILE_MARKING)
visitor->setHostInfo(this, m_tracingName.isEmpty() ? "Persistent" : m_tracingName);
#endif
@@ -819,14 +819,14 @@ template<typename T, typename U> inline bool operator!=(const Persistent<T>& a,
template<typename T> T* adoptRefWillBeNoop(T* ptr)
{
static const bool notRefCounted = !WTF::IsSubclassOfTemplate<typename WTF::RemoveConst<T>::Type, RefCounted>::value;
- COMPILE_ASSERT(notRefCounted, youMustAdopt);
+ static_assert(notRefCounted, "you must adopt");
return ptr;
}
template<typename T> T* adoptPtrWillBeNoop(T* ptr)
{
static const bool notRefCounted = !WTF::IsSubclassOfTemplate<typename WTF::RemoveConst<T>::Type, RefCounted>::value;
- COMPILE_ASSERT(notRefCounted, youMustAdopt);
+ static_assert(notRefCounted, "you must adopt");
return ptr;
}
« no previous file with comments | « Source/platform/geometry/Region.cpp ('k') | Source/platform/heap/Heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698