[Webkit-unassigned] [Bug 26997] [Chromium] Remove buggy usage of DEFINE_STATIC_LOCAL in V8Binding.cpp

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 6 15:51:29 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=26997





--- Comment #6 from Eric Seidel <eric at webkit.org>  2009-07-06 15:51:28 PDT ---
>From StdLibExtras.h:

// Use these to declare and define a static local variable (static T;) so that
//  it is leaked so that its destructors are not called at exit. Using this
//  macro also allows workarounds a compiler bug present in Apple's version of
GCC 4.0.1.
#if COMPILER(GCC) && defined(__APPLE_CC__) && __GNUC__ == 4 && __GNUC_MINOR__
== 0 && __GNUC_PATCHLEVEL__ == 1
#define DEFINE_STATIC_LOCAL(type, name, arguments) \
    static type* name##Ptr = new type arguments; \
    type& name = *name##Ptr
#else
#define DEFINE_STATIC_LOCAL(type, name, arguments) \
    static type& name = *new type arguments
#endif

These exist only to work around bugs in GCC 4.0.1 on Macs.  I don't know enough
about the bug to comment further however.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list