RESOLVED FIXED 119847
[Windows] Incorrect DLL Linkage for JavaScriptCore ArrayBuffer and ArrayBufferView
https://bugs.webkit.org/show_bug.cgi?id=119847
Summary [Windows] Incorrect DLL Linkage for JavaScriptCore ArrayBuffer and ArrayBuffe...
Brent Fulgham
Reported 2013-08-15 09:55:04 PDT
I noticed the following warnings in my build output: 7>..\runtime\ArrayBuffer.cpp(37): warning C4273: 'JSC::ArrayBuffer::transfer' : inconsistent dll linkage 7> c:\projects\webkit\opensource\source\javascriptcore\runtime\ArrayBuffer.h(109) : see previous definition of 'transfer' 7>..\runtime\ArrayBufferView.cpp(34): warning C4273: 'JSC::ArrayBufferView::ArrayBufferView' : inconsistent dll linkage 7> c:\projects\webkit\opensource\source\javascriptcore\runtime\ArrayBufferView.h(78) : see previous definition of '{ctor}' 7>..\runtime\ArrayBufferView.cpp(46): warning C4273: 'JSC::ArrayBufferView::~ArrayBufferView' : inconsistent dll linkage 7> c:\projects\webkit\opensource\source\javascriptcore\runtime\ArrayBufferView.h(75) : see previous definition of '{dtor}' 7>..\runtime\ArrayBufferView.cpp(52): warning C4273: 'JSC::ArrayBufferView::neuter' : inconsistent dll linkage 7> c:\projects\webkit\opensource\source\javascriptcore\runtime\ArrayBufferView.h(122) : see previous definition of 'neuter' These are caused by the use of a WTF export macro when building JSC: From JavaScriptCore/runtime/ArrayBuffer.h: WTF_EXPORT_PRIVATE bool transfer(ArrayBufferContents&, Vector<RefPtr<ArrayBufferView> >& neuteredViews); From JavaScriptCore/runtime/ArrayBufferView.h: WTF_EXPORT_PRIVATE virtual ~ArrayBufferView(); WTF_EXPORT_PRIVATE ArrayBufferView(PassRefPtr<ArrayBuffer>, unsigned byteOffset); WTF_EXPORT_PRIVATE virtual void neuter(); Unless you have WTF_IS_LINKED_IN_SAME_BINARY defined (which is only true when building the WTF.dll), WTF_EXPORT_PRIVATE is mapped to __declspec(dllimport). This means the linker will try to find these definitions in an external library. This should result in a compile failure, but I guess Visual Studio sees the definition in the implementation file and uses it.
Attachments
Patch (2.39 KB, patch)
2013-08-15 10:01 PDT, Brent Fulgham
oliver: review+
Radar WebKit Bug Importer
Comment 1 2013-08-15 09:58:29 PDT
Brent Fulgham
Comment 2 2013-08-15 10:01:21 PDT
Mark Lam
Comment 3 2013-08-15 10:03:50 PDT
Comment on attachment 208817 [details] Patch LGTM, but need someone else to r+.
Brent Fulgham
Comment 4 2013-08-15 12:29:08 PDT
Note You need to log in before you can comment on or make changes to this bug.