Ignore:
Timestamp:
Oct 6, 2011, 5:20:23 PM (14 years ago)
Author:
[email protected]
Message:

Add DEFINE_DEBUG_ONLY_GLOBAL for globals that should be defined in debug builds
https://bugs.webkit.org/show_bug.cgi?id=69584

Reviewed by Darin Adler.

../JavaScriptCore:

Add DEFINE_DEBUG_ONLY_GLOBAL macro.

  • wtf/StdLibExtras.h:

../WebCore:

Adopt the DEFINE_DEBUG_ONLY_GLOBAL macro.

  • bindings/js/JSLazyEventListener.cpp:
  • dom/Node.cpp:
  • dom/Range.cpp:
  • history/CachedPage.cpp:
  • loader/SubresourceLoader.cpp:
  • loader/cache/CachedResource.cpp:
  • page/Frame.cpp:
  • page/Page.cpp:
  • rendering/BidiRun.cpp:
  • rendering/RenderObject.cpp:
  • svg/SVGElementInstance.cpp:
  • xml/XMLHttpRequest.cpp:

../WebKit/mac:

Adopt the DEFINE_DEBUG_ONLY_GLOBAL macro.

  • Plugins/Hosted/HostedNetscapePluginStream.mm:
  • Plugins/Hosted/NetscapePluginInstanceProxy.mm:

../WebKit2:

Adopt the DEFINE_DEBUG_ONLY_GLOBAL macro.

  • UIProcess/WebContext.cpp:
  • UIProcess/WebPageProxy.cpp:
  • WebProcess/WebPage/WebFrame.cpp:
  • WebProcess/WebPage/WebPage.cpp:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/wtf/StdLibExtras.h

    r95901 r96880  
    4444#endif
    4545
     46// Use this macro to declare and define a debug-only global variable that may have a
     47// non-trivial constructor and destructor.
     48#ifndef NDEBUG
     49#define DEFINE_DEBUG_ONLY_GLOBAL(type, name, arguments) \
     50    static type name arguments;
     51#else
     52#define DEFINE_DEBUG_ONLY_GLOBAL(type, name, arguments)
     53#endif // NDEBUG
     54
    4655// OBJECT_OFFSETOF: Like the C++ offsetof macro, but you can use it with classes.
    4756// The magic number 0x4000 is insignificant. We use it to avoid using NULL, since
Note: See TracChangeset for help on using the changeset viewer.