+ template<typename Functor> inline typename Functor::ReturnType Heap::forEachProtectedCell(Functor& functor)
+ {
+ ProtectCountSet::iterator end = m_protectedValues.end();
+ for (ProtectCountSet::iterator it = m_protectedValues.begin(); it != end; ++it)
+ functor(it->first);
+ m_handleSet.forEachStrongHandle(functor, m_protectedValues);
+
+ return functor.returnValue();
+ }
+
+ template<typename Functor> inline typename Functor::ReturnType Heap::forEachProtectedCell()
+ {
+ Functor functor;
+ return forEachProtectedCell(functor);
+ }
+
+ inline void* Heap::allocateWithDestructor(size_t bytes)
+ {
+ ASSERT(isValidAllocation(bytes));
+ return m_objectSpace.allocateWithDestructor(bytes);
+ }
+
+ inline void* Heap::allocateWithoutDestructor(size_t bytes)
+ {
+ ASSERT(isValidAllocation(bytes));
+ return m_objectSpace.allocateWithoutDestructor(bytes);
+ }
+
+ inline CheckedBoolean Heap::tryAllocateStorage(size_t bytes, void** outPtr)
+ {
+ return m_storageSpace.tryAllocate(bytes, outPtr);
+ }
+
+ inline CheckedBoolean Heap::tryReallocateStorage(void** ptr, size_t oldSize, size_t newSize)
+ {
+ return m_storageSpace.tryReallocate(ptr, oldSize, newSize);
+ }
+
+ inline BlockAllocator& Heap::blockAllocator()