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/wtf/Assertions.h

    r38699 r39600  
    147147#define ASSERT_WITH_MESSAGE(assertion, ...) ((void)0)
    148148#define ASSERT_NOT_REACHED() ((void)0)
     149#define ASSERT_UNUSED(variable, assertion) ((void)variable)
    149150
    150151#else
     
    171172} while (0)
    172173
     174#define ASSERT_UNUSED(variable, assertion) ASSERT(assertion)
     175
    173176#endif
    174177
Note: See TracChangeset for help on using the changeset viewer.