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

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

Issue 1455943002: [Oilpan] Prepare full definition of classes before using Member (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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: third_party/WebKit/Source/platform/heap/Handle.h
diff --git a/third_party/WebKit/Source/platform/heap/Handle.h b/third_party/WebKit/Source/platform/heap/Handle.h
index 64e43fd71243011277fb2052e26dfe146148b0dc..8915068ff185aa3204d2542af2c03a22b4de037c 100644
--- a/third_party/WebKit/Source/platform/heap/Handle.h
+++ b/third_party/WebKit/Source/platform/heap/Handle.h
@@ -771,7 +771,11 @@ public:
checkPointer();
}
- T* get() const { return m_raw; }
+ T* get() const
+ {
+ static_assert(IsFullyDefined<T>::value, "T is not fully defined.");
haraken 2015/11/19 01:37:26 Would you replace other static_assert(sizeof(T)) i
peria 2015/11/19 03:57:51 Acknowledged.
+ return m_raw;
+ }
void clear() { m_raw = nullptr; }
@@ -779,6 +783,7 @@ public:
protected:
void checkPointer()
{
+ static_assert(IsFullyDefined<T>::value, "T is not fully defined.");
#if ENABLE(ASSERT) && defined(ADDRESS_SANITIZER)
if (!m_raw)
return;

Powered by Google App Engine
This is Rietveld 408576698