From 81bc750723a18f21cd17d1b173cd2a4dda9cea6e Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Tue, 24 May 2011 11:24:40 +0100 Subject: Merge WebKit at r80534: Intial merge by Git Change-Id: Ia7a83357124c9e1cdb1debf55d9661ec0bd09a61 --- Source/JavaScriptCore/wtf/OwnArrayPtr.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Source/JavaScriptCore/wtf/OwnArrayPtr.h') diff --git a/Source/JavaScriptCore/wtf/OwnArrayPtr.h b/Source/JavaScriptCore/wtf/OwnArrayPtr.h index 6b7c8da..2828698 100644 --- a/Source/JavaScriptCore/wtf/OwnArrayPtr.h +++ b/Source/JavaScriptCore/wtf/OwnArrayPtr.h @@ -111,6 +111,16 @@ template inline typename OwnArrayPtr::PtrType OwnArrayPtr::lea return ptr; } +#ifdef LOOSE_OWN_ARRAY_PTR +template inline void OwnArrayPtr::set(PtrType ptr) +{ + ASSERT(!ptr || m_ptr != ptr); + PtrType oldPtr = m_ptr; + m_ptr = ptr; + deleteOwnedArrayPtr(oldPtr); +} +#endif + template inline OwnArrayPtr& OwnArrayPtr::operator=(const PassOwnArrayPtr& o) { PtrType ptr = m_ptr; -- cgit v1.1