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

Unified Diff: third_party/WebKit/Source/platform/wtf/PtrUtil.h

Issue 2790463002: Fix WTF::makeUnique for arrays (Closed)
Patch Set: Updating include path Created 3 years, 9 months 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 | « third_party/WebKit/Source/platform/BUILD.gn ('k') | third_party/WebKit/Source/platform/wtf/PtrUtilTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/wtf/PtrUtil.h
diff --git a/third_party/WebKit/Source/platform/wtf/PtrUtil.h b/third_party/WebKit/Source/platform/wtf/PtrUtil.h
index 57ba0a8726c3b9b09a2655dccc6757e6f69b3c14..2d787cb83e68131f96f6cc9056b282c83296195a 100644
--- a/third_party/WebKit/Source/platform/wtf/PtrUtil.h
+++ b/third_party/WebKit/Source/platform/wtf/PtrUtil.h
@@ -9,6 +9,7 @@
#include "platform/wtf/TypeTraits.h"
#include <memory>
+#include <type_traits>
namespace WTF {
@@ -41,7 +42,7 @@ auto makeUnique(Args&&... args)
template <typename T>
auto makeUnique(size_t size) -> decltype(base::MakeUnique<T>(size)) {
static_assert(
- !WTF::IsGarbageCollectedType<T>::value,
+ !WTF::IsGarbageCollectedType<std::remove_extent<T>>::value,
"Garbage collected types should not be stored in std::unique_ptr!");
return base::MakeUnique<T>(size);
}
« no previous file with comments | « third_party/WebKit/Source/platform/BUILD.gn ('k') | third_party/WebKit/Source/platform/wtf/PtrUtilTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698