#include <wtf/MetaAllocator.h>
#include <wtf/NeverDestroyed.h>
#include <wtf/PageReservation.h>
-#if ENABLE(ASSEMBLER_WX_EXCLUSIVE)
-#include <wtf/PassOwnPtr.h>
-#endif
#include <wtf/ThreadingPrimitives.h>
#include <wtf/VMTags.h>
#endif
ExecutableAllocator::ExecutableAllocator(VM&)
#if ENABLE(ASSEMBLER_WX_EXCLUSIVE)
- : m_allocator(adoptPtr(new DemandExecutableAllocator()))
+ : m_allocator(std::make_unique<DemandExecutableAllocator>())
#endif
{
ASSERT(allocator());
}
-PassRefPtr<ExecutableMemoryHandle> ExecutableAllocator::allocate(VM&, size_t sizeInBytes, void* ownerUID, JITCompilationEffort effort)
+RefPtr<ExecutableMemoryHandle> ExecutableAllocator::allocate(VM&, size_t sizeInBytes, void* ownerUID, JITCompilationEffort effort)
{
RefPtr<ExecutableMemoryHandle> result = allocator()->allocate(sizeInBytes, ownerUID);
RELEASE_ASSERT(result || effort != JITCompilationMustSucceed);
- return result.release();
+ return result;
}
size_t ExecutableAllocator::committedByteCount()