Ignore:
Timestamp:
Jan 5, 2009, 9:21:13 AM (16 years ago)
Author:
[email protected]
Message:

Reviewed by Darin Adler.

https://bugs.webkit.org/show_bug.cgi?id=23115
Create a version of ASSERT for use with otherwise unused variables

JavaScriptCore:

  • wtf/Assertions.h: Added ASSERT_UNUSED.
  • jit/ExecutableAllocatorPosix.cpp: (JSC::ExecutablePool::systemRelease):
  • runtime/Collector.cpp: (JSC::Heap::destroy): (JSC::Heap::heapAllocate):
  • runtime/JSNotAnObject.cpp: (JSC::JSNotAnObject::toPrimitive): (JSC::JSNotAnObject::getPrimitiveNumber): (JSC::JSNotAnObject::toBoolean): (JSC::JSNotAnObject::toNumber): (JSC::JSNotAnObject::toString): (JSC::JSNotAnObject::getOwnPropertySlot): (JSC::JSNotAnObject::put): (JSC::JSNotAnObject::deleteProperty): (JSC::JSNotAnObject::getPropertyNames):
  • wtf/TCSystemAlloc.cpp: (TCMalloc_SystemRelease): Use it in some places that used other idioms for this purpose.

WebCore:

  • loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::verifySchemaVersion): Use the new ASSERT_UNUSED macro.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/Collector.cpp

    r38849 r39600  
    162162#if ENABLE(JSC_MULTIPLE_THREADS)
    163163    if (m_currentThreadRegistrar) {
    164 #ifndef NDEBUG
    165         int error =
    166 #endif
    167             pthread_key_delete(m_currentThreadRegistrar);
    168         ASSERT(!error);
     164        int error = pthread_key_delete(m_currentThreadRegistrar);
     165        ASSERT_UNUSED(error, !error);
    169166    }
    170167
     
    278275    ASSERT(JSLock::lockCount() > 0);
    279276    ASSERT(JSLock::currentThreadIsHoldingLock());
    280     ASSERT(s <= HeapConstants<heapType>::cellSize);
    281     UNUSED_PARAM(s); // s is now only used for the above assert
     277    ASSERT_UNUSED(s, s <= HeapConstants<heapType>::cellSize);
    282278
    283279    ASSERT(heap.operationInProgress == NoOperation);
Note: See TracChangeset for help on using the changeset viewer.