Ignore:
Timestamp:
Sep 18, 2012, 9:13:11 AM (13 years ago)
Author:
[email protected]
Message:

Use WTF::HasTrivialDestructor instead of compiler-specific versions in JSC::NeedsDestructor
https://bugs.webkit.org/show_bug.cgi?id=96980

Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

  • runtime/JSCell.h:

(JSC):
(NeedsDestructor):

Source/WTF:

  • wtf/TypeTraits.h:

(WTF):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSCell.h

    r128851 r128900  
    3434#include "WriteBarrier.h"
    3535#include <wtf/Noncopyable.h>
     36#include <wtf/TypeTraits.h>
    3637
    3738namespace JSC {
     
    309310    }
    310311
    311 #if COMPILER(CLANG)
    312312    template<class T>
    313313    struct NeedsDestructor {
    314         static const bool value = !__has_trivial_destructor(T);
     314        static const bool value = !WTF::HasTrivialDestructor<T>::value;
    315315    };
    316 #else
    317     // Write manual specializations for this struct template if you care about non-clang compilers.
    318     template<class T>
    319     struct NeedsDestructor {
    320         static const bool value = true;
    321     };
    322 #endif
    323316
    324317    template<typename T>
Note: See TracChangeset for help on using the changeset viewer.