 Chromium Code Reviews
 Chromium Code Reviews Issue 1017183003:
  Make DOMTypedArray exported.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master
    
  
    Issue 1017183003:
  Make DOMTypedArray exported.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master| Index: Source/core/dom/DOMTypedArray.h | 
| diff --git a/Source/core/dom/DOMTypedArray.h b/Source/core/dom/DOMTypedArray.h | 
| index 42cad9b50986b319e7750023d119eeb31e072ec4..52a3a2e2e0ee53ba4fd15ae7669f094fe9b3ca3e 100644 | 
| --- a/Source/core/dom/DOMTypedArray.h | 
| +++ b/Source/core/dom/DOMTypedArray.h | 
| @@ -6,6 +6,7 @@ | 
| #define DOMTypedArray_h | 
| #include "bindings/core/v8/ScriptWrappable.h" | 
| +#include "core/CoreExport.h" | 
| #include "core/dom/DOMArrayBufferView.h" | 
| #include "wtf/Float32Array.h" | 
| #include "wtf/Float64Array.h" | 
| @@ -22,8 +23,8 @@ namespace blink { | 
| template<typename WTFTypedArray, typename V8TypedArray> | 
| class DOMTypedArray final : public DOMArrayBufferView { | 
| - DEFINE_WRAPPERTYPEINFO(); | 
| typedef DOMTypedArray<WTFTypedArray, V8TypedArray> ThisType; | 
| + DECLARE_WRAPPERTYPEINFO_ONLY(); | 
| public: | 
| typedef typename WTFTypedArray::ValueType ValueType; | 
| @@ -50,14 +51,6 @@ public: | 
| return adoptRef(new ThisType(bufferView.release(), buffer.release())); | 
| } | 
| - static PassRefPtr<ThisType> createOrNull(unsigned length) | 
| - { | 
| - RefPtr<WTFTypedArray> bufferView = WTFTypedArray::createOrNull(length); | 
| - if (!bufferView) | 
| - return nullptr; | 
| - return create(bufferView.release()); | 
| - } | 
| - | 
| const WTFTypedArray* view() const { return static_cast<const WTFTypedArray*>(DOMArrayBufferView::view()); } | 
| WTFTypedArray* view() { return static_cast<WTFTypedArray*>(DOMArrayBufferView::view()); } | 
| @@ -85,6 +78,22 @@ private: | 
| : DOMArrayBufferView(bufferView, domArrayBuffer) { } | 
| }; | 
| +// The following extern template instantiation should not be enabled for | 
| +// win32, because '__declspec(dllexport)' and 'extern' are incompatible on an | 
| +// explicit instantiation (warning C4910). | 
| +// c.f. https://msdn.microsoft.com/en-us/library/bb531392(v=vs.90).aspx | 
| +#if !defined(WIN32) | 
| 
Yuki
2015/03/24 11:12:56
I think this is not a correct way.  Microsoft's in
 
tasak
2015/03/25 09:01:58
Updated according to offline discussion.
 | 
| +extern template class CORE_EXPORT DOMTypedArray<WTF::Int8Array, v8::Int8Array>; | 
| +extern template class CORE_EXPORT DOMTypedArray<WTF::Int16Array, v8::Int16Array>; | 
| +extern template class CORE_EXPORT DOMTypedArray<WTF::Int32Array, v8::Int32Array>; | 
| +extern template class CORE_EXPORT DOMTypedArray<WTF::Uint8Array, v8::Uint8Array>; | 
| +extern template class CORE_EXPORT DOMTypedArray<WTF::Uint8ClampedArray, v8::Uint8ClampedArray>; | 
| +extern template class CORE_EXPORT DOMTypedArray<WTF::Uint16Array, v8::Uint16Array>; | 
| +extern template class CORE_EXPORT DOMTypedArray<WTF::Uint32Array, v8::Uint32Array>; | 
| +extern template class CORE_EXPORT DOMTypedArray<WTF::Float32Array, v8::Float32Array>; | 
| +extern template class CORE_EXPORT DOMTypedArray<WTF::Float64Array, v8::Float64Array>; | 
| +#endif | 
| + | 
| typedef DOMTypedArray<WTF::Int8Array, v8::Int8Array> DOMInt8Array; | 
| typedef DOMTypedArray<WTF::Int16Array, v8::Int16Array> DOMInt16Array; | 
| typedef DOMTypedArray<WTF::Int32Array, v8::Int32Array> DOMInt32Array; |