Changeset 155143 in webkit


Ignore:
Timestamp:
Sep 5, 2013 1:12:23 PM (11 years ago)
Author:
andersca@apple.com
Message:

GCAssertions.h should use STL type traits and static_assert
https://bugs.webkit.org/show_bug.cgi?id=120785

Reviewed by Andreas Kling.

Source/JavaScriptCore:

There's no need to rely on compiler specific support to figure out if a class is trivially destructable,
we can just use type traits from STL. Do this, fix the assert macro to use static_assert directly and
rename it from ASSERT_HAS_TRIVIAL_DESTRUCTOR to STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE to clarify that
it's a static assert and to match the STL nomenclature.

  • API/JSCallbackFunction.cpp:
  • debugger/DebuggerActivation.cpp:
  • heap/GCAssertions.h:
  • runtime/ArrayConstructor.cpp:
  • runtime/BooleanConstructor.cpp:
  • runtime/BooleanObject.cpp:
  • runtime/BooleanPrototype.cpp:
  • runtime/DateConstructor.cpp:
  • runtime/ErrorConstructor.cpp:
  • runtime/ErrorInstance.cpp:
  • runtime/ErrorPrototype.cpp:
  • runtime/ExceptionHelpers.cpp:
  • runtime/FunctionConstructor.cpp:
  • runtime/FunctionPrototype.cpp:
  • runtime/GetterSetter.cpp:
  • runtime/InternalFunction.cpp:
  • runtime/JSAPIValueWrapper.cpp:
  • runtime/JSArray.cpp:
  • runtime/JSCell.cpp:
  • runtime/JSNotAnObject.cpp:
  • runtime/JSONObject.cpp:
  • runtime/JSObject.cpp:
  • runtime/JSPromiseConstructor.cpp:
  • runtime/JSPromisePrototype.cpp:
  • runtime/JSPromiseResolverConstructor.cpp:
  • runtime/JSPromiseResolverPrototype.cpp:
  • runtime/JSProxy.cpp:
  • runtime/JSScope.cpp:
  • runtime/JSWrapperObject.cpp:
  • runtime/MathObject.cpp:
  • runtime/NameConstructor.cpp:
  • runtime/NativeErrorConstructor.cpp:
  • runtime/NumberConstructor.cpp:
  • runtime/NumberObject.cpp:
  • runtime/NumberPrototype.cpp:
  • runtime/ObjectConstructor.cpp:
  • runtime/ObjectPrototype.cpp:
  • runtime/RegExpObject.cpp:
  • runtime/StrictEvalActivation.cpp:
  • runtime/StringConstructor.cpp:
  • runtime/StringObject.cpp:
  • runtime/StringPrototype.cpp:

Source/WebCore:

Update for JavaScriptCore changes.

  • bindings/js/JSDOMBinding.cpp:
  • bindings/js/JSImageConstructor.cpp:

Source/WebKit2:

Update for JavaScriptCore changes.

  • WebProcess/Plugins/Netscape/JSNPMethod.cpp:
Location:
trunk/Source
Files:
49 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSCallbackFunction.cpp

    r154038 r155143  
    4242namespace JSC {
    4343
    44 ASSERT_HAS_TRIVIAL_DESTRUCTOR(JSCallbackFunction);
     44STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSCallbackFunction);
    4545
    4646const ClassInfo JSCallbackFunction::s_info = { "CallbackFunction", &InternalFunction::s_info, 0, 0, CREATE_METHOD_TABLE(JSCallbackFunction) };
  • trunk/Source/JavaScriptCore/ChangeLog

    r155123 r155143  
     12013-09-05  Anders Carlsson  <andersca@apple.com>
     2
     3        GCAssertions.h should use STL type traits and static_assert
     4        https://bugs.webkit.org/show_bug.cgi?id=120785
     5
     6        Reviewed by Andreas Kling.
     7
     8        There's no need to rely on compiler specific support to figure out if a class is trivially destructable,
     9        we can just use type traits from STL. Do this, fix the assert macro to use static_assert directly and
     10        rename it from ASSERT_HAS_TRIVIAL_DESTRUCTOR to STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE to clarify that
     11        it's a static assert and to match the STL nomenclature.
     12       
     13        * API/JSCallbackFunction.cpp:
     14        * debugger/DebuggerActivation.cpp:
     15        * heap/GCAssertions.h:
     16        * runtime/ArrayConstructor.cpp:
     17        * runtime/BooleanConstructor.cpp:
     18        * runtime/BooleanObject.cpp:
     19        * runtime/BooleanPrototype.cpp:
     20        * runtime/DateConstructor.cpp:
     21        * runtime/ErrorConstructor.cpp:
     22        * runtime/ErrorInstance.cpp:
     23        * runtime/ErrorPrototype.cpp:
     24        * runtime/ExceptionHelpers.cpp:
     25        * runtime/FunctionConstructor.cpp:
     26        * runtime/FunctionPrototype.cpp:
     27        * runtime/GetterSetter.cpp:
     28        * runtime/InternalFunction.cpp:
     29        * runtime/JSAPIValueWrapper.cpp:
     30        * runtime/JSArray.cpp:
     31        * runtime/JSCell.cpp:
     32        * runtime/JSNotAnObject.cpp:
     33        * runtime/JSONObject.cpp:
     34        * runtime/JSObject.cpp:
     35        * runtime/JSPromiseConstructor.cpp:
     36        * runtime/JSPromisePrototype.cpp:
     37        * runtime/JSPromiseResolverConstructor.cpp:
     38        * runtime/JSPromiseResolverPrototype.cpp:
     39        * runtime/JSProxy.cpp:
     40        * runtime/JSScope.cpp:
     41        * runtime/JSWrapperObject.cpp:
     42        * runtime/MathObject.cpp:
     43        * runtime/NameConstructor.cpp:
     44        * runtime/NativeErrorConstructor.cpp:
     45        * runtime/NumberConstructor.cpp:
     46        * runtime/NumberObject.cpp:
     47        * runtime/NumberPrototype.cpp:
     48        * runtime/ObjectConstructor.cpp:
     49        * runtime/ObjectPrototype.cpp:
     50        * runtime/RegExpObject.cpp:
     51        * runtime/StrictEvalActivation.cpp:
     52        * runtime/StringConstructor.cpp:
     53        * runtime/StringObject.cpp:
     54        * runtime/StringPrototype.cpp:
     55
    1562013-09-05  Brent Fulgham  <bfulgham@apple.com>
    257
  • trunk/Source/JavaScriptCore/debugger/DebuggerActivation.cpp

    r154459 r155143  
    3232namespace JSC {
    3333
    34 ASSERT_HAS_TRIVIAL_DESTRUCTOR(DebuggerActivation);
     34STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(DebuggerActivation);
    3535
    3636const ClassInfo DebuggerActivation::s_info = { "DebuggerActivation", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(DebuggerActivation) };
  • trunk/Source/JavaScriptCore/heap/GCAssertions.h

    r140584 r155143  
    2727#define GCAssertions_h
    2828
     29#include <type_traits>
    2930#include <wtf/Assertions.h>
    3031
     
    4546#endif
    4647
    47 #if COMPILER_SUPPORTS(HAS_TRIVIAL_DESTRUCTOR)
    48 #define ASSERT_HAS_TRIVIAL_DESTRUCTOR(klass) COMPILE_ASSERT(__has_trivial_destructor(klass), klass##_has_trivial_destructor_check)
     48#if COMPILER(CLANG)
     49#define STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(klass) static_assert(std::is_trivially_destructible<klass>::value, #klass " must have a trivial destructor")
     50#elif COMPILER(MSVC)
     51// An earlier verison of the C++11 spec used to call this type trait std::has_trivial_destructor, and that's what MSVC uses.
     52#define STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(klass) static_assert(std::has_trivial_destructor<klass>::value, #klass " must have a trivial destructor")
    4953#else
    50 #define ASSERT_HAS_TRIVIAL_DESTRUCTOR(klass)
     54// This is not enabled on GCC due to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52702
     55#define STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(klass)
    5156#endif
    5257
  • trunk/Source/JavaScriptCore/runtime/ArrayConstructor.cpp

    r154797 r155143  
    4545namespace JSC {
    4646
    47 ASSERT_HAS_TRIVIAL_DESTRUCTOR(ArrayConstructor);
     47STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(ArrayConstructor);
    4848
    4949const ClassInfo ArrayConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::arrayConstructorTable, CREATE_METHOD_TABLE(ArrayConstructor) };
  • trunk/Source/JavaScriptCore/runtime/BooleanConstructor.cpp

    r148696 r155143  
    2828namespace JSC {
    2929
    30 ASSERT_HAS_TRIVIAL_DESTRUCTOR(BooleanConstructor);
     30STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(BooleanConstructor);
    3131
    3232const ClassInfo BooleanConstructor::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(BooleanConstructor) };
  • trunk/Source/JavaScriptCore/runtime/BooleanObject.cpp

    r154038 r155143  
    2727namespace JSC {
    2828
    29 ASSERT_HAS_TRIVIAL_DESTRUCTOR(BooleanObject);
     29STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(BooleanObject);
    3030
    3131const ClassInfo BooleanObject::s_info = { "Boolean", &JSWrapperObject::s_info, 0, 0, CREATE_METHOD_TABLE(BooleanObject) };
  • trunk/Source/JavaScriptCore/runtime/BooleanPrototype.cpp

    r154373 r155143  
    4949*/
    5050
    51 ASSERT_HAS_TRIVIAL_DESTRUCTOR(BooleanPrototype);
     51STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(BooleanPrototype);
    5252
    5353BooleanPrototype::BooleanPrototype(ExecState* exec, Structure* structure)
  • trunk/Source/JavaScriptCore/runtime/DateConstructor.cpp

    r154373 r155143  
    7373*/
    7474
    75 ASSERT_HAS_TRIVIAL_DESTRUCTOR(DateConstructor);
     75STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(DateConstructor);
    7676
    7777DateConstructor::DateConstructor(JSGlobalObject* globalObject, Structure* structure)
  • trunk/Source/JavaScriptCore/runtime/ErrorConstructor.cpp

    r153823 r155143  
    3030namespace JSC {
    3131
    32 ASSERT_HAS_TRIVIAL_DESTRUCTOR(ErrorConstructor);
     32STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(ErrorConstructor);
    3333
    3434const ClassInfo ErrorConstructor::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(ErrorConstructor) };
  • trunk/Source/JavaScriptCore/runtime/ErrorInstance.cpp

    r154460 r155143  
    2727namespace JSC {
    2828
    29 ASSERT_HAS_TRIVIAL_DESTRUCTOR(ErrorInstance);
     29STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(ErrorInstance);
    3030
    3131const ClassInfo ErrorInstance::s_info = { "Error", &JSNonFinalObject::s_info, 0, 0, CREATE_METHOD_TABLE(ErrorInstance) };
  • trunk/Source/JavaScriptCore/runtime/ErrorPrototype.cpp

    r154373 r155143  
    3232namespace JSC {
    3333
    34 ASSERT_HAS_TRIVIAL_DESTRUCTOR(ErrorPrototype);
     34STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(ErrorPrototype);
    3535
    3636static EncodedJSValue JSC_HOST_CALL errorProtoFuncToString(ExecState*);
  • trunk/Source/JavaScriptCore/runtime/ExceptionHelpers.cpp

    r154892 r155143  
    4242namespace JSC {
    4343
    44 ASSERT_HAS_TRIVIAL_DESTRUCTOR(TerminatedExecutionError);
     44STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(TerminatedExecutionError);
    4545
    4646const ClassInfo TerminatedExecutionError::s_info = { "TerminatedExecutionError", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(TerminatedExecutionError) };
  • trunk/Source/JavaScriptCore/runtime/FunctionConstructor.cpp

    r154797 r155143  
    3636namespace JSC {
    3737
    38 ASSERT_HAS_TRIVIAL_DESTRUCTOR(FunctionConstructor);
     38STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(FunctionConstructor);
    3939
    4040const ClassInfo FunctionConstructor::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(FunctionConstructor) };
  • trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp

    r154038 r155143  
    3434namespace JSC {
    3535
    36 ASSERT_HAS_TRIVIAL_DESTRUCTOR(FunctionPrototype);
     36STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(FunctionPrototype);
    3737
    3838const ClassInfo FunctionPrototype::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(FunctionPrototype) };
  • trunk/Source/JavaScriptCore/runtime/GetterSetter.cpp

    r154038 r155143  
    3131namespace JSC {
    3232
    33 ASSERT_HAS_TRIVIAL_DESTRUCTOR(GetterSetter);
     33STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(GetterSetter);
    3434
    3535const ClassInfo GetterSetter::s_info = { "GetterSetter", 0, 0, 0, CREATE_METHOD_TABLE(GetterSetter) };
  • trunk/Source/JavaScriptCore/runtime/InternalFunction.cpp

    r154038 r155143  
    3131namespace JSC {
    3232
    33 ASSERT_HAS_TRIVIAL_DESTRUCTOR(InternalFunction);
     33STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(InternalFunction);
    3434
    3535const ClassInfo InternalFunction::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(InternalFunction) };
  • trunk/Source/JavaScriptCore/runtime/JSAPIValueWrapper.cpp

    r127191 r155143  
    2828namespace JSC {
    2929
    30 ASSERT_HAS_TRIVIAL_DESTRUCTOR(JSAPIValueWrapper);
     30STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSAPIValueWrapper);
    3131
    3232const ClassInfo JSAPIValueWrapper::s_info = { "API Wrapper", 0, 0, 0, CREATE_METHOD_TABLE(JSAPIValueWrapper) };
  • trunk/Source/JavaScriptCore/runtime/JSArray.cpp

    r154797 r155143  
    4545namespace JSC {
    4646
    47 ASSERT_HAS_TRIVIAL_DESTRUCTOR(JSArray);
     47STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSArray);
    4848
    4949const ClassInfo JSArray::s_info = {"Array", &JSNonFinalObject::s_info, 0, 0, CREATE_METHOD_TABLE(JSArray)};
  • trunk/Source/JavaScriptCore/runtime/JSCell.cpp

    r154459 r155143  
    3434namespace JSC {
    3535
    36 ASSERT_HAS_TRIVIAL_DESTRUCTOR(JSCell);
     36STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSCell);
    3737
    3838void JSCell::destroy(JSCell* cell)
  • trunk/Source/JavaScriptCore/runtime/JSNotAnObject.cpp

    r154373 r155143  
    3535namespace JSC {
    3636
    37 ASSERT_HAS_TRIVIAL_DESTRUCTOR(JSNotAnObject);
     37STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSNotAnObject);
    3838
    3939const ClassInfo JSNotAnObject::s_info = { "Object", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSNotAnObject) };
  • trunk/Source/JavaScriptCore/runtime/JSONObject.cpp

    r154992 r155143  
    4444namespace JSC {
    4545
    46 ASSERT_HAS_TRIVIAL_DESTRUCTOR(JSONObject);
     46STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSONObject);
    4747
    4848static EncodedJSValue JSC_HOST_CALL JSONProtoFuncParse(ExecState*);
  • trunk/Source/JavaScriptCore/runtime/JSObject.cpp

    r154797 r155143  
    6666}
    6767
    68 ASSERT_HAS_TRIVIAL_DESTRUCTOR(JSObject);
    69 ASSERT_HAS_TRIVIAL_DESTRUCTOR(JSFinalObject);
     68STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSObject);
     69STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSFinalObject);
    7070
    7171const char* StrictModeReadonlyPropertyWriteError = "Attempted to assign to readonly property.";
  • trunk/Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp

    r154847 r155143  
    4141namespace JSC {
    4242
    43 ASSERT_HAS_TRIVIAL_DESTRUCTOR(JSPromiseConstructor);
     43STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSPromiseConstructor);
    4444
    4545// static Promise fulfill(any value);
  • trunk/Source/JavaScriptCore/runtime/JSPromisePrototype.cpp

    r154847 r155143  
    4040namespace JSC {
    4141
    42 ASSERT_HAS_TRIVIAL_DESTRUCTOR(JSPromisePrototype);
     42STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSPromisePrototype);
    4343
    4444// Promise then([TreatUndefinedAs=Missing] optional AnyCallback fulfillCallback, [TreatUndefinedAs=Missing] optional AnyCallback rejectCallback);
  • trunk/Source/JavaScriptCore/runtime/JSPromiseResolverConstructor.cpp

    r154847 r155143  
    3737namespace JSC {
    3838
    39 ASSERT_HAS_TRIVIAL_DESTRUCTOR(JSPromiseResolverConstructor);
     39STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSPromiseResolverConstructor);
    4040
    4141const ClassInfo JSPromiseResolverConstructor::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSPromiseResolverConstructor) };
  • trunk/Source/JavaScriptCore/runtime/JSPromiseResolverPrototype.cpp

    r154847 r155143  
    3737namespace JSC {
    3838
    39 ASSERT_HAS_TRIVIAL_DESTRUCTOR(JSPromiseResolverPrototype);
     39STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSPromiseResolverPrototype);
    4040
    4141// void fulfill(optional any value);
  • trunk/Source/JavaScriptCore/runtime/JSProxy.cpp

    r154459 r155143  
    3232namespace JSC {
    3333
    34 ASSERT_HAS_TRIVIAL_DESTRUCTOR(JSProxy);
     34STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSProxy);
    3535
    3636const ClassInfo JSProxy::s_info = { "JSProxy", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSProxy) };
  • trunk/Source/JavaScriptCore/runtime/JSScope.cpp

    r154038 r155143  
    3535namespace JSC {
    3636
    37 ASSERT_HAS_TRIVIAL_DESTRUCTOR(JSScope);
     37STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSScope);
    3838
    3939void JSScope::visitChildren(JSCell* cell, SlotVisitor& visitor)
  • trunk/Source/JavaScriptCore/runtime/JSWrapperObject.cpp

    r154038 r155143  
    2727namespace JSC {
    2828
    29 ASSERT_HAS_TRIVIAL_DESTRUCTOR(JSWrapperObject);
     29STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSWrapperObject);
    3030
    3131void JSWrapperObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
  • trunk/Source/JavaScriptCore/runtime/MathObject.cpp

    r154038 r155143  
    3333namespace JSC {
    3434
    35 ASSERT_HAS_TRIVIAL_DESTRUCTOR(MathObject);
     35STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(MathObject);
    3636
    3737static EncodedJSValue JSC_HOST_CALL mathProtoFuncAbs(ExecState*);
  • trunk/Source/JavaScriptCore/runtime/NameConstructor.cpp

    r148696 r155143  
    3333namespace JSC {
    3434
    35 ASSERT_HAS_TRIVIAL_DESTRUCTOR(NameConstructor);
     35STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(NameConstructor);
    3636
    3737const ClassInfo NameConstructor::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(NameConstructor) };
  • trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp

    r154038 r155143  
    3030namespace JSC {
    3131
    32 ASSERT_HAS_TRIVIAL_DESTRUCTOR(NativeErrorConstructor);
     32STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(NativeErrorConstructor);
    3333
    3434const ClassInfo NativeErrorConstructor::s_info = { "Function", &InternalFunction::s_info, 0, 0, CREATE_METHOD_TABLE(NativeErrorConstructor) };
  • trunk/Source/JavaScriptCore/runtime/NumberConstructor.cpp

    r154373 r155143  
    4242namespace JSC {
    4343
    44 ASSERT_HAS_TRIVIAL_DESTRUCTOR(NumberConstructor);
     44STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(NumberConstructor);
    4545
    4646const ClassInfo NumberConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::numberConstructorTable, CREATE_METHOD_TABLE(NumberConstructor) };
  • trunk/Source/JavaScriptCore/runtime/NumberObject.cpp

    r154038 r155143  
    2929namespace JSC {
    3030
    31 ASSERT_HAS_TRIVIAL_DESTRUCTOR(NumberObject);
     31STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(NumberObject);
    3232
    3333const ClassInfo NumberObject::s_info = { "Number", &JSWrapperObject::s_info, 0, 0, CREATE_METHOD_TABLE(NumberObject) };
  • trunk/Source/JavaScriptCore/runtime/NumberPrototype.cpp

    r154373 r155143  
    6969*/
    7070
    71 ASSERT_HAS_TRIVIAL_DESTRUCTOR(NumberPrototype);
     71STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(NumberPrototype);
    7272
    7373NumberPrototype::NumberPrototype(ExecState* exec, Structure* structure)
  • trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp

    r155081 r155143  
    5959namespace JSC {
    6060
    61 ASSERT_HAS_TRIVIAL_DESTRUCTOR(ObjectConstructor);
     61STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(ObjectConstructor);
    6262
    6363const ClassInfo ObjectConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::objectConstructorTable, CREATE_METHOD_TABLE(ObjectConstructor) };
  • trunk/Source/JavaScriptCore/runtime/ObjectPrototype.cpp

    r154405 r155143  
    4242static EncodedJSValue JSC_HOST_CALL objectProtoFuncToLocaleString(ExecState*);
    4343
    44 ASSERT_HAS_TRIVIAL_DESTRUCTOR(ObjectPrototype);
     44STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(ObjectPrototype);
    4545
    4646const ClassInfo ObjectPrototype::s_info = { "Object", &JSNonFinalObject::s_info, 0, 0, CREATE_METHOD_TABLE(ObjectPrototype) };
  • trunk/Source/JavaScriptCore/runtime/RegExpObject.cpp

    r154422 r155143  
    5151namespace JSC {
    5252
    53 ASSERT_HAS_TRIVIAL_DESTRUCTOR(RegExpObject);
     53STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(RegExpObject);
    5454
    5555const ClassInfo RegExpObject::s_info = { "RegExp", &Base::s_info, 0, ExecState::regExpTable, CREATE_METHOD_TABLE(RegExpObject) };
  • trunk/Source/JavaScriptCore/runtime/StrictEvalActivation.cpp

    r153145 r155143  
    3232namespace JSC {
    3333
    34 ASSERT_HAS_TRIVIAL_DESTRUCTOR(StrictEvalActivation);
     34STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(StrictEvalActivation);
    3535
    3636const ClassInfo StrictEvalActivation::s_info = { "Object", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(StrictEvalActivation) };
  • trunk/Source/JavaScriptCore/runtime/StringConstructor.cpp

    r154373 r155143  
    4747*/
    4848
    49 ASSERT_HAS_TRIVIAL_DESTRUCTOR(StringConstructor);
     49STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(StringConstructor);
    5050
    5151StringConstructor::StringConstructor(JSGlobalObject* globalObject, Structure* structure)
  • trunk/Source/JavaScriptCore/runtime/StringObject.cpp

    r154797 r155143  
    2929namespace JSC {
    3030
    31 ASSERT_HAS_TRIVIAL_DESTRUCTOR(StringObject);
     31STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(StringObject);
    3232
    3333const ClassInfo StringObject::s_info = { "String", &JSWrapperObject::s_info, 0, 0, CREATE_METHOD_TABLE(StringObject) };
  • trunk/Source/JavaScriptCore/runtime/StringPrototype.cpp

    r154038 r155143  
    4848namespace JSC {
    4949
    50 ASSERT_HAS_TRIVIAL_DESTRUCTOR(StringPrototype);
     50STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(StringPrototype);
    5151
    5252static EncodedJSValue JSC_HOST_CALL stringProtoFuncToString(ExecState*);
  • trunk/Source/WebCore/ChangeLog

    r155142 r155143  
     12013-09-05  Anders Carlsson  <andersca@apple.com>
     2
     3        GCAssertions.h should use STL type traits and static_assert
     4        https://bugs.webkit.org/show_bug.cgi?id=120785
     5
     6        Reviewed by Andreas Kling.
     7
     8        Update for JavaScriptCore changes.
     9
     10        * bindings/js/JSDOMBinding.cpp:
     11        * bindings/js/JSImageConstructor.cpp:
     12
    1132013-09-05  David Hyatt  <hyatt@apple.com>
    214
  • trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp

    r154797 r155143  
    4646namespace WebCore {
    4747
    48 ASSERT_HAS_TRIVIAL_DESTRUCTOR(DOMConstructorObject);
    49 ASSERT_HAS_TRIVIAL_DESTRUCTOR(DOMConstructorWithDocument);
     48STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(DOMConstructorObject);
     49STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(DOMConstructorWithDocument);
    5050
    5151const JSC::HashTable* getHashTableForGlobalData(VM& vm, const JSC::HashTable* staticTable)
  • trunk/Source/WebCore/bindings/js/JSDOMWrapper.cpp

    r103121 r155143  
    3333namespace WebCore {
    3434
    35 ASSERT_HAS_TRIVIAL_DESTRUCTOR(JSDOMWrapper);
     35STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSDOMWrapper);
    3636
    3737} // namespace WebCore
  • trunk/Source/WebCore/bindings/js/JSImageConstructor.cpp

    r154038 r155143  
    3131namespace WebCore {
    3232
    33 ASSERT_HAS_TRIVIAL_DESTRUCTOR(JSImageConstructor);
     33STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSImageConstructor);
    3434
    3535const ClassInfo JSImageConstructor::s_info = { "ImageConstructor", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSImageConstructor) };
  • trunk/Source/WebKit2/ChangeLog

    r155125 r155143  
     12013-09-05  Anders Carlsson  <andersca@apple.com>
     2
     3        GCAssertions.h should use STL type traits and static_assert
     4        https://bugs.webkit.org/show_bug.cgi?id=120785
     5
     6        Reviewed by Andreas Kling.
     7
     8        Update for JavaScriptCore changes.
     9
     10        * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
     11
    1122013-09-05  Alberto Garcia  <berto@igalia.com>
    213
  • trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPMethod.cpp

    r154038 r155143  
    4242namespace WebKit {
    4343
    44 ASSERT_HAS_TRIVIAL_DESTRUCTOR(JSNPMethod);
     44STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSNPMethod);
    4545
    4646const ClassInfo JSNPMethod::s_info = { "NPMethod", &InternalFunction::s_info, 0, 0, CREATE_METHOD_TABLE(JSNPMethod) };
Note: See TracChangeset for help on using the changeset viewer.