WebKit Bugzilla
Attachment 370782 Details for
Bug 198093
: [CMake] Build with hidden visibility by default
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
WIP Patch
hidden-visibility.diff (text/plain), 13.03 KB, created by
Christopher Reid
on 2019-05-28 13:49:06 PDT
(
hide
)
Description:
WIP Patch
Filename:
MIME Type:
Creator:
Christopher Reid
Created:
2019-05-28 13:49:06 PDT
Size:
13.03 KB
patch
obsolete
>diff --git a/Source/JavaScriptCore/API/glib/JSCContextPrivate.h b/Source/JavaScriptCore/API/glib/JSCContextPrivate.h >index fc7270ed52e..739fc4976c2 100644 >--- a/Source/JavaScriptCore/API/glib/JSCContextPrivate.h >+++ b/Source/JavaScriptCore/API/glib/JSCContextPrivate.h >@@ -25,15 +25,14 @@ > #include "JSContextRef.h" > #include <wtf/glib/GRefPtr.h> > >-GRefPtr<JSCContext> jscContextGetOrCreate(JSGlobalContextRef); >-JSGlobalContextRef jscContextGetJSContext(JSCContext*); >-GRefPtr<JSCValue> jscContextGetOrCreateValue(JSCContext*, JSValueRef); >-void jscContextValueDestroyed(JSCContext*, JSValueRef); >-JSC::JSObject* jscContextGetJSWrapper(JSCContext*, gpointer); >-JSC::JSObject* jscContextGetOrCreateJSWrapper(JSCContext*, JSClassRef, JSValueRef prototype = nullptr, gpointer = nullptr, GDestroyNotify = nullptr); >-JSGlobalContextRef jscContextCreateContextWithJSWrapper(JSCContext*, JSClassRef, JSValueRef prototype = nullptr, gpointer = nullptr, GDestroyNotify = nullptr); >-gpointer jscContextWrappedObject(JSCContext*, JSObjectRef); >-JSCClass* jscContextGetRegisteredClass(JSCContext*, JSClassRef); >+JS_EXPORT_PRIVATE GRefPtr<JSCContext> jscContextGetOrCreate(JSGlobalContextRef); >+JS_EXPORT_PRIVATE JSGlobalContextRef jscContextGetJSContext(JSCContext*); >+JS_EXPORT_PRIVATE GRefPtr<JSCValue> jscContextGetOrCreateValue(JSCContext*, JSValueRef); >+JS_EXPORT_PRIVATE void jscContextValueDestroyed(JSCContext*, JSValueRef); >+JS_EXPORT_PRIVATE JSC::JSObject* jscContextGetJSWrapper(JSCContext*, gpointer); JSC::JSObject* jscContextGetOrCreateJSWrapper(JSCContext*, JSClassRef, JSValueRef prototype = nullptr, gpointer = nullptr, GDestroyNotify = nullptr); >+JS_EXPORT_PRIVATE JSGlobalContextRef jscContextCreateContextWithJSWrapper(JSCContext*, JSClassRef, JSValueRef prototype = nullptr, gpointer = nullptr, GDestroyNotify = nullptr); >+JS_EXPORT_PRIVATE gpointer jscContextWrappedObject(JSCContext*, JSObjectRef); >+JS_EXPORT_PRIVATE JSCClass* jscContextGetRegisteredClass(JSCContext*, JSClassRef); > > struct CallbackData { > GRefPtr<JSCContext> context; >diff --git a/Source/JavaScriptCore/API/glib/JSCValuePrivate.h b/Source/JavaScriptCore/API/glib/JSCValuePrivate.h >index 62144353f55..9317d028af9 100644 >--- a/Source/JavaScriptCore/API/glib/JSCValuePrivate.h >+++ b/Source/JavaScriptCore/API/glib/JSCValuePrivate.h >@@ -21,5 +21,5 @@ > > #include "JSCValue.h" > >-JSValueRef jscValueGetJSValue(JSCValue*); >-JSCValue* jscValueCreate(JSCContext*, JSValueRef); >+JS_EXPORT_PRIVATE JSValueRef jscValueGetJSValue(JSCValue*); >+JS_EXPORT_PRIVATE JSCValue* jscValueCreate(JSCContext*, JSValueRef); >diff --git a/Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorServer.h b/Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorServer.h >index f6c7b4efbde..e5bfc439fd4 100644 >--- a/Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorServer.h >+++ b/Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorServer.h >@@ -44,10 +44,10 @@ namespace Inspector { > > class RemoteInspectorServer { > public: >- static RemoteInspectorServer& singleton(); >- ~RemoteInspectorServer(); >+ JS_EXPORT_PRIVATE static RemoteInspectorServer& singleton(); >+ JS_EXPORT_PRIVATE ~RemoteInspectorServer(); > >- bool start(const char* address, unsigned port); >+ JS_EXPORT_PRIVATE bool start(const char* address, unsigned port); > bool isRunning() const { return !!m_dbusServer; } > > private: >diff --git a/Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorUtils.h b/Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorUtils.h >index 6f95ab5c52a..ea43307abdd 100644 >--- a/Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorUtils.h >+++ b/Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorUtils.h >@@ -35,7 +35,7 @@ typedef struct _GBytes GBytes; > namespace Inspector { > > GRefPtr<GBytes> backendCommands(); >-const CString& backendCommandsHash(); >+JS_EXPORT_PRIVATE const CString& backendCommandsHash(); > > } // namespace Inspector > >diff --git a/Source/WebCore/platform/ContentType.h b/Source/WebCore/platform/ContentType.h >index c82b5b7197c..23e1f12bf2a 100644 >--- a/Source/WebCore/platform/ContentType.h >+++ b/Source/WebCore/platform/ContentType.h >@@ -37,11 +37,11 @@ public: > explicit ContentType(const String& type); > ContentType() = default; > >- static const String& codecsParameter(); >+ WEBCORE_EXPORT static const String& codecsParameter(); > static const String& profilesParameter(); > >- String parameter(const String& parameterName) const; >- String containerType() const; >+ WEBCORE_EXPORT String parameter(const String& parameterName) const; >+ WEBCORE_EXPORT String containerType() const; > Vector<String> codecs() const; > Vector<String> profiles() const; > const String& raw() const { return m_type; } >diff --git a/Source/WebCore/platform/graphics/MediaPlayer.h b/Source/WebCore/platform/graphics/MediaPlayer.h >index 3e1263bbb63..679fdd912d8 100644 >--- a/Source/WebCore/platform/graphics/MediaPlayer.h >+++ b/Source/WebCore/platform/graphics/MediaPlayer.h >@@ -402,15 +402,15 @@ public: > Preload preload() const; > void setPreload(Preload); > >- void networkStateChanged(); >- void readyStateChanged(); >+ WEBCORE_EXPORT void networkStateChanged(); >+ WEBCORE_EXPORT void readyStateChanged(); > void volumeChanged(double); > void muteChanged(bool); >- void timeChanged(); >+ WEBCORE_EXPORT void timeChanged(); > void sizeChanged(); > void rateChanged(); > void playbackStateChanged(); >- void durationChanged(); >+ WEBCORE_EXPORT void durationChanged(); > void firstVideoFrameAvailable(); > void characteristicChanged(); > >diff --git a/Source/WebCore/platform/graphics/PlatformTimeRanges.h b/Source/WebCore/platform/graphics/PlatformTimeRanges.h >index 1888695c76e..9a3ae8ad63c 100644 >--- a/Source/WebCore/platform/graphics/PlatformTimeRanges.h >+++ b/Source/WebCore/platform/graphics/PlatformTimeRanges.h >@@ -40,12 +40,12 @@ class PlatformTimeRanges { > WTF_MAKE_FAST_ALLOCATED; > public: > explicit PlatformTimeRanges() { } >- PlatformTimeRanges(const MediaTime& start, const MediaTime& end); >+ WEBCORE_EXPORT PlatformTimeRanges(const MediaTime& start, const MediaTime& end); > > WEBCORE_EXPORT MediaTime start(unsigned index) const; > MediaTime start(unsigned index, bool& valid) const; > WEBCORE_EXPORT MediaTime end(unsigned index) const; >- MediaTime end(unsigned index, bool& valid) const; >+ WEBCORE_EXPORT MediaTime end(unsigned index, bool& valid) const; > MediaTime duration(unsigned index) const; > MediaTime maximumBufferedTime() const; > >@@ -59,11 +59,11 @@ public: > > bool contain(const MediaTime&) const; > >- size_t find(const MediaTime&) const; >+ WEBCORE_EXPORT size_t find(const MediaTime&) const; > > MediaTime nearest(const MediaTime&) const; > >- MediaTime totalDuration() const; >+ WEBCORE_EXPORT MediaTime totalDuration() const; > > void dump(WTF::PrintStream&) const; > >diff --git a/Source/WebCore/platform/graphics/cairo/RefPtrCairo.h b/Source/WebCore/platform/graphics/cairo/RefPtrCairo.h >index aa1d19226b3..ec07678db24 100644 >--- a/Source/WebCore/platform/graphics/cairo/RefPtrCairo.h >+++ b/Source/WebCore/platform/graphics/cairo/RefPtrCairo.h >@@ -36,7 +36,7 @@ namespace WTF { > template<> void refIfNotNull(cairo_t* ptr); > template<> WEBCORE_EXPORT void derefIfNotNull(cairo_t* ptr); > >-template<> void refIfNotNull(cairo_surface_t* ptr); >+template<> WEBCORE_EXPORT void refIfNotNull(cairo_surface_t* ptr); > template<> WEBCORE_EXPORT void derefIfNotNull(cairo_surface_t* ptr); > > template<> void refIfNotNull(cairo_font_face_t* ptr); >diff --git a/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp b/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp >index d5ac0ed691a..c6e686ac469 100644 >--- a/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp >+++ b/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp >@@ -34,6 +34,7 @@ > #include "UTF16UChar32Iterator.h" > #include <cairo-ft.h> > #include <cairo.h> >+#include <fontconfig/fontconfig.h> > #include <fontconfig/fcfreetype.h> > #include <wtf/Assertions.h> > #include <wtf/text/CString.h> >diff --git a/Source/WebCore/platform/network/soup/CertificateInfo.h b/Source/WebCore/platform/network/soup/CertificateInfo.h >index 939bae580a7..f147b7585a4 100644 >--- a/Source/WebCore/platform/network/soup/CertificateInfo.h >+++ b/Source/WebCore/platform/network/soup/CertificateInfo.h >@@ -40,7 +40,7 @@ namespace WebCore { > class ResourceError; > class ResourceResponse; > >-class CertificateInfo : public CertificateInfoBase { >+class WEBCORE_EXPORT CertificateInfo : public CertificateInfoBase { > public: > CertificateInfo(); > explicit CertificateInfo(const WebCore::ResourceResponse&); >diff --git a/Source/WebCore/platform/network/soup/SoupNetworkSession.h b/Source/WebCore/platform/network/soup/SoupNetworkSession.h >index ffbd49a762a..1dd413e5bb6 100644 >--- a/Source/WebCore/platform/network/soup/SoupNetworkSession.h >+++ b/Source/WebCore/platform/network/soup/SoupNetworkSession.h >@@ -65,7 +65,7 @@ public: > static void setInitialAcceptLanguages(const CString&); > void setAcceptLanguages(const CString&); > >- static void setShouldIgnoreTLSErrors(bool); >+ WEBCORE_EXPORT static void setShouldIgnoreTLSErrors(bool); > static Optional<ResourceError> checkTLSErrors(const URL&, GTlsCertificate*, GTlsCertificateFlags); > static void allowSpecificHTTPSCertificateForHost(const CertificateInfo&, const String& host); > >diff --git a/Source/WebKit/UIProcess/gtk/InputMethodFilter.h b/Source/WebKit/UIProcess/gtk/InputMethodFilter.h >index 2a4af6ac03c..d004627719b 100644 >--- a/Source/WebKit/UIProcess/gtk/InputMethodFilter.h >+++ b/Source/WebKit/UIProcess/gtk/InputMethodFilter.h >@@ -20,6 +20,7 @@ > #ifndef InputMethodFilter_h > #define InputMethodFilter_h > >+#include "WKDeclarationSpecifiers.h" > #include <WebCore/IntPoint.h> > #include <wtf/Function.h> > #include <wtf/Noncopyable.h> >@@ -46,21 +47,21 @@ public: > EventNotFaked > }; > >- InputMethodFilter(); >- ~InputMethodFilter(); >+ WK_EXPORT InputMethodFilter(); >+ WK_EXPORT ~InputMethodFilter(); > > GtkIMContext* context() const { return m_context.get(); } > > void setPage(WebPageProxy* page) { m_page = page; } > >- void setEnabled(bool); >+ WK_EXPORT void setEnabled(bool); > void setCursorRect(const WebCore::IntRect&); > > using FilterKeyEventCompletionHandler = Function<void(const WebCore::CompositionResults&, InputMethodFilter::EventFakedForComposition)>; >- void filterKeyEvent(GdkEventKey*, FilterKeyEventCompletionHandler&& = nullptr); >- void notifyFocusedIn(); >- void notifyFocusedOut(); >- void notifyMouseButtonPress(); >+ WK_EXPORT void filterKeyEvent(GdkEventKey*, FilterKeyEventCompletionHandler&& = nullptr); >+ WK_EXPORT void notifyFocusedIn(); >+ WK_EXPORT void notifyFocusedOut(); >+ WK_EXPORT void notifyMouseButtonPress(); > > #if ENABLE(API_TESTS) > void setTestingMode(bool enable) { m_testingMode = enable; } >diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake >index d290beffdd9..bbbc6a73492 100644 >--- a/Source/cmake/OptionsGTK.cmake >+++ b/Source/cmake/OptionsGTK.cmake >@@ -194,6 +194,8 @@ set(GDK_INCLUDE_DIRS ${GDK3_INCLUDE_DIRS}) > SET_AND_EXPOSE_TO_BUILD(HAVE_GTK_GESTURES ${GTK3_SUPPORTS_GESTURES}) > SET_AND_EXPOSE_TO_BUILD(HAVE_GTK_UNIX_PRINTING ${GTKUnixPrint_FOUND}) > SET_AND_EXPOSE_TO_BUILD(HAVE_OS_DARK_MODE_SUPPORT 1) >+SET_AND_EXPOSE_TO_BUILD(USE_EXPORT_MACROS ON) >+SET_AND_EXPOSE_TO_BUILD(BUSE_EXPORT_MACROS ON) > > set(glib_components gio gio-unix gobject gthread gmodule) > find_package(GLIB 2.36 REQUIRED COMPONENTS ${glib_components}) >diff --git a/Source/cmake/WebKitCompilerFlags.cmake b/Source/cmake/WebKitCompilerFlags.cmake >index f56a47bbe4b..01f5d0e00d3 100644 >--- a/Source/cmake/WebKitCompilerFlags.cmake >+++ b/Source/cmake/WebKitCompilerFlags.cmake >@@ -103,6 +103,7 @@ if (COMPILER_IS_GCC_OR_CLANG) > else () > WEBKIT_APPEND_GLOBAL_COMPILER_FLAGS(-fno-exceptions) > WEBKIT_APPEND_GLOBAL_CXX_FLAGS(-fno-rtti) >+ WEBKIT_APPEND_GLOBAL_COMPILER_FLAGS(-fvisibility=hidden) > > check_cxx_compiler_flag("-std=c++17" CXX_COMPILER_SUPPORTS_CXX17) > if (CXX_COMPILER_SUPPORTS_CXX17) >diff --git a/Tools/TestWebKitAPI/InjectedBundleMain.cpp b/Tools/TestWebKitAPI/InjectedBundleMain.cpp >index b2537f737d5..6590f6bdde6 100644 >--- a/Tools/TestWebKitAPI/InjectedBundleMain.cpp >+++ b/Tools/TestWebKitAPI/InjectedBundleMain.cpp >@@ -32,6 +32,8 @@ > > #if defined(WIN32) || defined(_WIN32) > extern "C" __declspec(dllexport) >+#elif defined(unix) || defined(__unix) // TODO Not sure how this was also working before >+extern "C" __attribute__((visibility("default"))) > #else > extern "C" > #endif >diff --git a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp >index dfa3d318f57..2f4c3fa25e7 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp >+++ b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp >@@ -30,6 +30,8 @@ > > #if defined(WIN32) > extern "C" __declspec(dllexport) >+#elif defined(unix) || defined(__unix) // TODO Not sure how these worked before >+extern "C" __attribute__((visibility("default"))) > #else > extern "C" > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198093
:
370355
|
370782
|
371357