[GTK] Duplicated symbols in libjavascriptcoregtk and libwebkit2gtk can cause crashes...
authormcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Dec 2017 17:18:43 +0000 (17:18 +0000)
committermcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Dec 2017 17:18:43 +0000 (17:18 +0000)
commite80ed73b245ab12a6b0e61497fc373f77fa565fd
tree9ac428c7bcfcb6c2877d256e46a2c5619f6d7db1
parent8f9bd404dc8d23a8ad14e39e17c59768c11624bf
[GTK] Duplicated symbols in libjavascriptcoregtk and libwebkit2gtk can cause crashes in production builds
https://bugs.webkit.org/show_bug.cgi?id=179914

Reviewed by Carlos Garcia Campos.

.:

* CMakeLists.txt:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsJSCOnly.cmake:
* Source/cmake/OptionsMac.cmake:
* Source/cmake/OptionsWPE.cmake:
* Source/cmake/OptionsWin.cmake:
* Source/cmake/WebKitCompilerFlags.cmake:
* Source/cmake/wpesymbols.filter: Removed.

Source/JavaScriptCore:

Add a new JavaScriptCoreGTK build target, to build JSC as a shared library. Link the
original JavaScriptCore build target, which is now a static library, to it. Use
--whole-archive to prevent all the JavaScriptCore symbols from being dropped, since none are
used directly by JavaScriptCoreGTK.

The installed libjavascriptcoregtk-4.0 now corresponds to the JavaScriptCoreGTK target,
instead of the JavaScriptCore target. There is almost no difference on the installed system,
except that we now use a version script when linking, to hide private symbols, since they're
no longer needed by libwebkit2gtk-4.0.so.

Also, move the symbols map here.

* PlatformGTK.cmake:
* javascriptcoregtk-symbols.map: Added.

Source/WebCore:

* CMakeLists.txt: Test for WebCore_LIBRARY_TYPE rather than SHARED_CORE.

Source/WebKit:

Mark a few InjectedBundle symbols with default visibility, so they don't get hidden by
-fvisibility=hidden. Also, remove Windows conditionals, since Windows is not supported by
any GLib ports.

Also, move the symbols map to here, and share it between WPE and GTK.

* CMakeLists.txt:
* PlatformGTK.cmake:
* PlatformWPE.cmake:
* WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.h:
* WebProcess/InjectedBundle/API/glib/WebKitInjectedBundleMain.cpp:
* webkitglib-symbols.map: Renamed from Source/cmake/gtksymbols.filter.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226266 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
CMakeLists.txt
ChangeLog
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/PlatformGTK.cmake
Source/JavaScriptCore/javascriptcoregtk-symbols.map [new file with mode: 0644]
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebKit/CMakeLists.txt
Source/WebKit/ChangeLog
Source/WebKit/PlatformGTK.cmake
Source/WebKit/PlatformWPE.cmake
Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.h
Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitInjectedBundleMain.cpp
Source/WebKit/webkitglib-symbols.map [moved from Source/cmake/gtksymbols.filter with 50% similarity]
Source/cmake/OptionsGTK.cmake
Source/cmake/OptionsJSCOnly.cmake
Source/cmake/OptionsMac.cmake
Source/cmake/OptionsWPE.cmake
Source/cmake/OptionsWin.cmake
Source/cmake/WebKitCompilerFlags.cmake
Source/cmake/wpesymbols.filter [deleted file]