Changeset 83709 in webkit


Ignore:
Timestamp:
Apr 13, 2011 1:14:36 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-04-13 Paul Knight <pknight@apple.com>

Reviewed by Gavin Barraclough.

BACKTRACE() macro should check for Debug configuration in macro, not WTFReportBacktrace definition
https://bugs.webkit.org/show_bug.cgi?id=58405

The BACKTRACE() macro requires JavaScriptCore be built with a Debug
configuration in order for it to be enabled. Move the NDEBUG check to
the header so it will be enabled when the calling framework or
application is built with a Debug configuration, similar to how
ASSERT() and friends work.

  • wtf/Assertions.cpp:
  • wtf/Assertions.h:
Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r83704 r83709  
     12011-04-13  Paul Knight  <pknight@apple.com>
     2
     3        Reviewed by Gavin Barraclough.
     4
     5        BACKTRACE() macro should check for Debug configuration in macro, not WTFReportBacktrace definition
     6        https://bugs.webkit.org/show_bug.cgi?id=58405
     7
     8        The BACKTRACE() macro requires JavaScriptCore be built with a Debug
     9        configuration in order for it to be enabled. Move the NDEBUG check to
     10        the header so it will be enabled when the calling framework or
     11        application is built with a Debug configuration, similar to how
     12        ASSERT() and friends work.
     13
     14        * wtf/Assertions.cpp:
     15        * wtf/Assertions.h:
     16
    1172011-04-12  Ben Taylor  <bentaylor.solx86@gmail.com>
    218
  • trunk/Source/JavaScriptCore/wtf/Assertions.cpp

    r81624 r83709  
    216216void WTFReportBacktrace()
    217217{
    218 #if PLATFORM(MAC) && !defined(NDEBUG)
     218#if PLATFORM(MAC)
    219219    static const int maxFrames = 32;
    220220    void* samples[maxFrames];
  • trunk/Source/JavaScriptCore/wtf/Assertions.h

    r81135 r83709  
    7474#endif
    7575
     76#ifndef BACKTRACE_DISABLED
     77#define BACKTRACE_DISABLED ASSERTIONS_DISABLED_DEFAULT
     78#endif
     79
    7680#ifndef ASSERT_DISABLED
    7781#define ASSERT_DISABLED ASSERTIONS_DISABLED_DEFAULT
     
    189193  Print a backtrace to the same location as ASSERT messages.
    190194*/
    191 #ifndef BACKTRACE
     195
     196#if BACKTRACE_DISABLED
     197
     198#define BACKTRACE() ((void)0)
     199
     200#else
     201
    192202#define BACKTRACE() do { \
    193203    WTFReportBacktrace(); \
    194204} while(false)
     205
    195206#endif
    196207
Note: See TracChangeset for help on using the changeset viewer.