RESOLVED INVALID 37268
[Qt] JS_EXPORT incorrectly calls __declspec(dllexport) in static libraries
https://bugs.webkit.org/show_bug.cgi?id=37268
Summary [Qt] JS_EXPORT incorrectly calls __declspec(dllexport) in static libraries
qt-info
Reported 2010-04-08 07:32:55 PDT
JS_EXPORT incorrectly calls __declspec(dllexport) in static libraries this ends up meaning that a compiled EXE that brings in Webkit / QtScript ends up incorrectly exporting methods from JavascriptCore The offending lines are: #elif defined(WIN32) || defined(_WIN32) /* * TODO: Export symbols with JS_EXPORT when using MSVC. * See http://bugs.webkit.org/show_bug.cgi?id=16227 */ #if defined(BUILDING_JavaScriptCore) || defined(BUILDING_WTF) #define JS_EXPORT __declspec(dllexport) #else #define JS_EXPORT __declspec(dllimport) #endif #else #define JS_EXPORT #endif in QTDIR\src\3rdparty\JavascriptCore\API The end result is: Microsoft (R) COFF/PE Dumper Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved. Dump of file Capsule.exe File Type: EXECUTABLE IMAGE Section contains the following exports for Capsule.exe 00000000 characteristics 4BBC752A time date stamp Wed Apr 07 13:06:02 2010 0.00 version 1 ordinal base 81 number of functions 81 number of names ordinal hint RVA name 1 0 0147F074 ?emptyBaseString@Rep@UString@JSC@@0PAUBaseString@23@A 2 1 013CE384 ?info@DateInstance@JSC@@2UClassInfo@2@B 3 2 013CE3F0 ?info@InternalFunction@JSC@@2UClassInfo@2@B 4 3 013CE3B0 ?info@JSArray@JSC@@2UClassInfo@2@B 5 4 013CE4B8 ?info@JSFunction@JSC@@2UClassInfo@2@B 6 5 013D5178 ?info@StringObject@JSC@@2UClassInfo@2@B 7 6 0147F078 ?nullBaseString@Rep@UString@JSC@@0PAUBaseString@23@A 8 7 0079E830 JSClassCreate 9 8 0079DFD0 JSClassRelease 10 9 0079DDD0 JSClassRetain 11 A 00931B90 JSContextGetGlobalContext 12 B 00931B30 JSContextGetGlobalObject 13 C 00931B80 JSContextGetGroup 14 D 00931D50 JSContextGroupCreate 15 E 00931C70 JSContextGroupRelease 16 F 0079DE20 JSContextGroupRetain 17 10 00933D50 JSGlobalContextCreate 18 11 00933810 JSGlobalContextCreateInGroup 19 12 00931CA0 JSGlobalContextRelease 20 13 00931BE0 JSGlobalContextRetain 21 14 007A1CA0 JSObjectCallAsConstructor 22 15 007A1A00 JSObjectCallAsFunction 23 16 007A1EE0 JSObjectCopyPropertyNames 24 17 0079E3E0 JSObjectDeleteProperty 25 18 0079E4B0 JSObjectGetPrivate 26 19 0079E1A0 JSObjectGetProperty 27 1A 0079E6D0 JSObjectGetPropertyAtIndex 28 1B 0079DE90 JSObjectGetPrototype 29 1C 0079E120 JSObjectHasProperty 30 1D 0079DE00 JSObjectIsConstructor 31 1E 0079DDE0 JSObjectIsFunction 32 1F 007A06B0 JSObjectMake 33 20 007A1250 JSObjectMakeArray 34 21 0079E940 JSObjectMakeConstructor 35 22 007A1490 JSObjectMakeDate 36 23 007A1660 JSObjectMakeError 37 24 007A0EE0 JSObjectMakeFunction 38 25 0079E000 JSObjectMakeFunctionWithCallback 39 26 007A1830 JSObjectMakeRegExp 40 27 0079E500 JSObjectSetPrivate 41 28 0079E2A0 JSObjectSetProperty 42 29 0079DF10 JSObjectSetPropertyAtIndex 43 2A 0079EA30 JSObjectSetPrototype 44 2B 0079E560 JSPropertyNameAccumulatorAddName 45 2C 00A69C20 JSPropertyNameArrayGetCount 46 2D 0079E7A0 JSPropertyNameArrayGetNameAtIndex 47 2E 0079ECB0 JSPropertyNameArrayRelease 48 2F 0079DE20 JSPropertyNameArrayRetain 49 30 00930C50 JSStringCreateWithCharacters 50 31 00930CB0 JSStringCreateWithUTF8CString 51 32 00DE5A60 JSStringGetCharactersPtr 52 33 009309D0 JSStringGetLength 53 34 009309E0 JSStringGetMaximumUTF8CStringSize 54 35 00930A00 JSStringGetUTF8CString 55 36 00930A70 JSStringIsEqual 56 37 00930E10 JSStringIsEqualToUTF8CString 57 38 00930B20 JSStringRelease 58 39 0079DDD0 JSStringRetain 59 3A 0079CDD0 JSValueGetType 60 3B 0079CFB0 JSValueIsBoolean 61 3C 0079D170 JSValueIsEqual 62 3D 0079D7A0 JSValueIsInstanceOfConstructor 63 3E 0079CF40 JSValueIsNull 64 3F 0079D020 JSValueIsNumber 65 40 0079D100 JSValueIsObject 66 41 0079D980 JSValueIsObjectOfClass 67 42 0079DA90 JSValueIsStrictEqual 68 43 0079D090 JSValueIsString 69 44 0079CED0 JSValueIsUndefined 70 45 0079D340 JSValueMakeBoolean 71 46 0079D2E0 JSValueMakeNull 72 47 0079D8C0 JSValueMakeNumber 73 48 0079DB30 JSValueMakeString 74 49 0079D280 JSValueMakeUndefined 75 4A 0079D680 JSValueProtect 76 4B 0079D3E0 JSValueToBoolean 77 4C 0079D470 JSValueToNumber 78 4D 0079D580 JSValueToObject 79 4E 0079DC10 JSValueToStringCopy 80 4F 0079D710 JSValueUnprotect 81 50 010FCD88 kJSClassDefinitionEmpty Naturally this isn't desirable as an executable is not supposed to export symbols.
Attachments
Alexey Proskuryakov
Comment 1 2010-04-08 11:00:54 PDT
Why define BUILDING_JavaScriptCore or BUILDING_WTF when not building a dynamic library?
Note You need to log in before you can comment on or make changes to this bug.