summaryrefslogtreecommitdiffstats
path: root/Source/JavaScriptCore/wtf/PassOwnArrayPtr.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/wtf/PassOwnArrayPtr.h')
-rw-r--r--Source/JavaScriptCore/wtf/PassOwnArrayPtr.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/JavaScriptCore/wtf/PassOwnArrayPtr.h b/Source/JavaScriptCore/wtf/PassOwnArrayPtr.h
index e1aa61e..3f30924 100644
--- a/Source/JavaScriptCore/wtf/PassOwnArrayPtr.h
+++ b/Source/JavaScriptCore/wtf/PassOwnArrayPtr.h
@@ -30,9 +30,6 @@
#include "NullPtr.h"
#include "TypeTraits.h"
-// Remove this once we make all WebKit code compatible with stricter rules about PassOwnArrayPtr.
-#define LOOSE_PASS_OWN_ARRAY_PTR
-
namespace WTF {
template<typename T> class OwnArrayPtr;
@@ -46,6 +43,10 @@ public:
PassOwnArrayPtr() : m_ptr(0) { }
+#if !defined(LOOSE_PASS_OWN_PTR) || !HAVE(NULLPTR)
+ PassOwnArrayPtr(std::nullptr_t) : m_ptr(0) { }
+#endif
+
// It somewhat breaks the type system to allow transfer of ownership out of
// a const PassOwnArrayPtr. However, it makes it much easier to work with PassOwnArrayPtr
// temporaries, and we don't have a need to use real const PassOwnArrayPtrs anyway.