Adjust WEBCORE_EXPORT annotations for LTO
authorkrollin@apple.com <krollin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Jun 2018 02:05:35 +0000 (02:05 +0000)
committerkrollin@apple.com <krollin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Jun 2018 02:05:35 +0000 (02:05 +0000)
commit91b7c7de7ef5e4e9e70255cb787c7ec58ad41bb4
tree02bfa30fe511ea7b47515af1f98454d0f1731625
parente00091b86d8fb18ea770b87e810f95a9047b4505
Adjust WEBCORE_EXPORT annotations for LTO
https://bugs.webkit.org/show_bug.cgi?id=186944
<rdar://problem/41384880>

Reviewed by David Kilzer.

Adjust a number of places that result in WebKit's
'check-for-weak-vtables-and-externals' script reporting weak external
symbols:

    ERROR: WebCore has a weak external symbol in it (/Volumes/Data/dev/webkit/OpenSource/WebKitBuild/Release/WebCore.framework/Versions/A/WebCore)
    ERROR: A weak external symbol is generated when a symbol is defined in multiple compilation units and is also marked as being exported from the library.
    ERROR: A common cause of weak external symbols is when an inline function is listed in the linker export file.
    ...

These cases are caused by inline methods being marked with WTF_EXPORT
(or related macro) or with an inline function being in a class marked
as such, and when enabling LTO builds.

For the most part, address these by removing the WEBCORE_EXPORT
annotation from inline methods. In some cases, move the implementation
out-of-line because it's the class that has the WEBCORE_EXPORT on it
and removing the annotation from the class would be too disruptive.
Finally, in other cases, move the implementation out-of-line because
check-for-weak-vtables-and-externals still complains when keeping the
implementation inline and removing the annotation; this seems to
typically (but not always) happen with destructors.

No new tests. There is no changed functionality. Only the annotation
and treatment of inline methods are altered.

* animation/AnimationTimeline.h:
(WebCore::AnimationTimeline::pause):
* page/CacheStorageProvider.h:
(): Deleted.
* page/scrolling/ScrollingTree.h:
(WebCore::ScrollingTree::reportSynchronousScrollingReasonsChanged):
(WebCore::ScrollingTree::reportExposedUnfilledArea):
* platform/audio/PlatformMediaSessionManager.h:
(WebCore::PlatformMediaSessionManager::hasActiveNowPlayingSession const):
(WebCore::PlatformMediaSessionManager::lastUpdatedNowPlayingTitle const):
(WebCore::PlatformMediaSessionManager::lastUpdatedNowPlayingDuration const):
(WebCore::PlatformMediaSessionManager::lastUpdatedNowPlayingElapsedTime const):
(WebCore::PlatformMediaSessionManager::lastUpdatedNowPlayingInfoUniqueIdentifier const):
(WebCore::PlatformMediaSessionManager::registeredAsNowPlayingApplication const):
* platform/audio/mac/CARingBuffer.cpp:
(WebCore::CARingBuffer::~CARingBuffer):
* platform/audio/mac/CARingBuffer.h:
(WebCore::CARingBuffer::~CARingBuffer): Deleted.
* platform/cocoa/VideoFullscreenModelVideoElement.h:
* platform/gamepad/GamepadProvider.h:
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::displayListAsText const):
(WebCore::GraphicsLayer::setIsTrackingDisplayListReplay):
(WebCore::GraphicsLayer::isTrackingDisplayListReplay const):
(WebCore::GraphicsLayer::replayDisplayListAsText const):
* platform/mac/PlaybackSessionInterfaceMac.h:
* platform/mediastream/RealtimeMediaSourceCenter.h:
(WebCore::RealtimeMediaSourceCenter::setAudioFactory):
(WebCore::RealtimeMediaSourceCenter::unsetAudioFactory):
* platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
(WebCore::LibWebRTCProvider::setActive):
(WebCore::LibWebRTCProvider::createDecoderFactory):
(WebCore::LibWebRTCProvider::createEncoderFactory):
(WebCore::LibWebRTCProvider::disableEnumeratingAllNetworkInterfaces):
(WebCore::LibWebRTCProvider::enableEnumeratingAllNetworkInterfaces):
* platform/mediastream/libwebrtc/LibWebRTCProvider.h:
* platform/network/ResourceHandleClient.h:
(WebCore::ResourceHandleClient::willCacheResponseAsync):
* testing/MockGamepadProvider.h:
* workers/service/server/SWServer.h:
(WebCore::SWServer::Connection::~Connection):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233189 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
Source/WebCore/ChangeLog
Source/WebCore/animation/AnimationTimeline.h
Source/WebCore/page/CacheStorageProvider.h
Source/WebCore/page/scrolling/ScrollingTree.h
Source/WebCore/platform/audio/PlatformMediaSessionManager.h
Source/WebCore/platform/audio/mac/CARingBuffer.cpp
Source/WebCore/platform/audio/mac/CARingBuffer.h
Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.h
Source/WebCore/platform/gamepad/GamepadProvider.h
Source/WebCore/platform/graphics/GraphicsLayer.h
Source/WebCore/platform/mac/PlaybackSessionInterfaceMac.h
Source/WebCore/platform/mac/PlaybackSessionInterfaceMac.mm
Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.h
Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp
Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h
Source/WebCore/platform/network/ResourceHandleClient.h
Source/WebCore/testing/MockGamepadProvider.h
Source/WebCore/workers/service/server/SWServer.h