Ignore:
Timestamp:
Sep 14, 2016, 3:32:58 PM (9 years ago)
Author:
[email protected]
Message:

Pragma out undefined-var-template warnings in JSC for JSObjects that are templatized
https://bugs.webkit.org/show_bug.cgi?id=161985

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

I started a true fix for this in
https://bugs.webkit.org/show_bug.cgi?id=161979, however the fix
for this issue is not sustainable. Since the scope of this issue
is just limited to the static const ClassInfo member it is
simpler to just pragma out this warning. This works because
COMDAT will, AFAIK, pick the actual specialization. If, in the
future, we want to expose these classes to WebCore we will need to
do what we do for JSGenericTypedArrayViews and create a custom
info() function with a switch.

This patch also fixes a bunch of weak external symbols due to one of:
1) out of line template member definitions functions not being marked inline.
2) inline member functions definitions being marked as exported.
3) missing header file includes for forward function declarations.

  • API/JSCallbackObject.h:
  • b3/B3ValueInlines.h:

(JSC::B3::Value::as):

  • runtime/HashMapImpl.h:
  • runtime/JSCJSValue.h:

(JSC::toUInt32): Deleted.

  • runtime/JSGenericTypedArrayView.h:

(JSC::JSGenericTypedArrayView::setIndexQuicklyToDouble):

  • runtime/JSGenericTypedArrayViewConstructor.h:
  • runtime/JSGenericTypedArrayViewPrototype.h:
  • runtime/MathCommon.h:

(JSC::toUInt32):

  • runtime/TypedArrayAdaptors.h:
  • runtime/VM.h:

(JSC::VM::watchdog):
(JSC::VM::heapProfiler):
(JSC::VM::samplingProfiler):

Source/WTF:

Fix WTF_EXPORT_PRIVATE for an inline member function. This would
generate a weak export.

  • wtf/MetaAllocator.h:

(WTF::MetaAllocator::getLock):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSCallbackObject.h

    r201703 r205933  
    150150    void* getPrivate();
    151151
     152    // FIXME: We should fix the warnings for extern-template in JSObject template classes: https://bugs.webkit.org/show_bug.cgi?id=161979
     153#if COMPILER(CLANG)
     154#if __has_warning("-Wundefined-var-template")
     155#pragma clang diagnostic push
     156#pragma clang diagnostic ignored "-Wundefined-var-template"
     157#endif
     158#endif
    152159    DECLARE_INFO;
     160#if COMPILER(CLANG)
     161#if __has_warning("-Wundefined-var-template")
     162#pragma clang diagnostic pop
     163#endif
     164#endif
    153165
    154166    JSClassRef classRef() const { return m_callbackObjectData->jsClass; }
Note: See TracChangeset for help on using the changeset viewer.