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

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: another fixup 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
Index: Source/platform/heap/Handle.h
diff --git a/Source/platform/heap/Handle.h b/Source/platform/heap/Handle.h
index 309bd4b354531ecca9d450eb6c04b91f2f03dd26..a87526fbb9ae7eb2af290351443d670bd6c1944e 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
@@ -820,14 +820,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;
}

Powered by Google App Engine
This is Rietveld 408576698