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)
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

index 0e5c357..e7623c7 100644 (file)
@@ -1,3 +1,78 @@
+2018-06-25  Keith Rollin  <krollin@apple.com>
+
+        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):
+
 2018-06-25  Zalan Bujtas  <zalan@apple.com>
 
         [LFC] Adjust static position for out-of-flow positioned boxes.
index edae5c6..fb2a0c3 100644 (file)
@@ -53,7 +53,7 @@ public:
     virtual std::optional<Seconds> currentTime() { return m_currentTime; }
     WEBCORE_EXPORT void setCurrentTime(Seconds);
     WEBCORE_EXPORT String description();
-    WEBCORE_EXPORT virtual void pause() { };
+    virtual void pause() { };
 
     virtual void timingModelDidChange() { };
 
index 0cb6ce2..e1fcc2b 100644 (file)
@@ -31,7 +31,7 @@
 
 namespace WebCore {
 
-class WEBCORE_EXPORT CacheStorageProvider : public RefCounted<CacheStorageProvider> {
+class CacheStorageProvider : public RefCounted<CacheStorageProvider> {
 public:
     static Ref<CacheStorageProvider> create() { return adoptRef(*new CacheStorageProvider); }
     virtual Ref<CacheStorageConnection> createCacheStorageConnection(PAL::SessionID) { return CacheStorageConnection::create(); }
index 1d9deaa..e77b972 100644 (file)
@@ -91,8 +91,8 @@ public:
     // and call scrollingTreeNodeDidScroll().
     WEBCORE_EXPORT virtual void scrollPositionChangedViaDelegatedScrolling(ScrollingNodeID, const WebCore::FloatPoint& scrollPosition, bool inUserInteraction);
 
-    WEBCORE_EXPORT virtual void reportSynchronousScrollingReasonsChanged(MonotonicTime, SynchronousScrollingReasons) { }
-    WEBCORE_EXPORT virtual void reportExposedUnfilledArea(MonotonicTime, unsigned /* unfilledArea */) { }
+    virtual void reportSynchronousScrollingReasonsChanged(MonotonicTime, SynchronousScrollingReasons) { }
+    virtual void reportExposedUnfilledArea(MonotonicTime, unsigned /* unfilledArea */) { }
 
     FloatPoint mainFrameScrollPosition();
     
index b8b7cea..8dcfd11 100644 (file)
@@ -55,12 +55,12 @@ public:
     bool activeAudioSessionRequired() const;
     bool canProduceAudio() const;
 
-    WEBCORE_EXPORT virtual bool hasActiveNowPlayingSession() const { return false; }
-    WEBCORE_EXPORT virtual String lastUpdatedNowPlayingTitle() const { return emptyString(); }
-    WEBCORE_EXPORT virtual double lastUpdatedNowPlayingDuration() const { return NAN; }
-    WEBCORE_EXPORT virtual double lastUpdatedNowPlayingElapsedTime() const { return NAN; }
-    WEBCORE_EXPORT virtual uint64_t lastUpdatedNowPlayingInfoUniqueIdentifier() const { return 0; }
-    WEBCORE_EXPORT virtual bool registeredAsNowPlayingApplication() const { return false; }
+    virtual bool hasActiveNowPlayingSession() const { return false; }
+    virtual String lastUpdatedNowPlayingTitle() const { return emptyString(); }
+    virtual double lastUpdatedNowPlayingDuration() const { return NAN; }
+    virtual double lastUpdatedNowPlayingElapsedTime() const { return NAN; }
+    virtual uint64_t lastUpdatedNowPlayingInfoUniqueIdentifier() const { return 0; }
+    virtual bool registeredAsNowPlayingApplication() const { return false; }
 
     bool willIgnoreSystemInterruptions() const { return m_willIgnoreSystemInterruptions; }
     void setWillIgnoreSystemInterruptions(bool ignore) { m_willIgnoreSystemInterruptions = ignore; }
index 7d6bba7..ed7a7a5 100644 (file)
@@ -44,6 +44,11 @@ CARingBuffer::CARingBuffer()
 {
 }
 
+CARingBuffer::~CARingBuffer()
+{
+    deallocate();
+}
+
 CARingBuffer::CARingBuffer(UniqueRef<CARingBufferStorage>&& storage)
     : m_buffers(WTFMove(storage))
     , m_timeBoundsQueue(kGeneralRingTimeBoundsQueueSize)
index 45022d3..c8ca7db 100644 (file)
@@ -61,10 +61,7 @@ class CARingBuffer {
 public:
     WEBCORE_EXPORT CARingBuffer();
     WEBCORE_EXPORT CARingBuffer(UniqueRef<CARingBufferStorage>&&);
-    WEBCORE_EXPORT ~CARingBuffer()
-    {
-        deallocate();
-    }
+    WEBCORE_EXPORT ~CARingBuffer();
 
     enum Error {
         Ok,
index 81f84f5..36b1857 100644 (file)
@@ -69,8 +69,8 @@ public:
     WEBCORE_EXPORT void setVideoLayerGravity(VideoGravity) override;
     WEBCORE_EXPORT void fullscreenModeChanged(HTMLMediaElementEnums::VideoFullscreenMode) override;
     WEBCORE_EXPORT bool isVisible() const override;
-    WEBCORE_EXPORT FloatSize videoDimensions() const override { return m_videoDimensions; }
-    WEBCORE_EXPORT bool hasVideo() const override { return m_hasVideo; }
+    FloatSize videoDimensions() const override { return m_videoDimensions; }
+    bool hasVideo() const override { return m_hasVideo; }
 
 
 protected:
index c3b939f..702dac4 100644 (file)
@@ -35,7 +35,7 @@ namespace WebCore {
 class GamepadProviderClient;
 class PlatformGamepad;
 
-class WEBCORE_EXPORT GamepadProvider {
+class GamepadProvider {
 public:
     virtual ~GamepadProvider() = default;
 
@@ -48,7 +48,7 @@ public:
     virtual bool isMockGamepadProvider() const { return false; }
 
 protected:
-    void dispatchPlatformGamepadInputActivity();
+    WEBCORE_EXPORT void dispatchPlatformGamepadInputActivity();
     void setShouldMakeGamepadsVisibile() { m_shouldMakeGamepadsVisible = true; }
     HashSet<GamepadProviderClient*> m_clients;
 
index 10eda15..67b6393 100644 (file)
@@ -542,11 +542,11 @@ public:
     WEBCORE_EXPORT String layerTreeAsText(LayerTreeAsTextBehavior = LayerTreeAsTextBehaviorNormal) const;
 
     // For testing.
-    WEBCORE_EXPORT virtual String displayListAsText(DisplayList::AsTextFlags) const { return String(); }
+    virtual String displayListAsText(DisplayList::AsTextFlags) const { return String(); }
 
-    WEBCORE_EXPORT virtual void setIsTrackingDisplayListReplay(bool isTracking) { m_isTrackingDisplayListReplay = isTracking; }
-    WEBCORE_EXPORT virtual bool isTrackingDisplayListReplay() const { return m_isTrackingDisplayListReplay; }
-    WEBCORE_EXPORT virtual String replayDisplayListAsText(DisplayList::AsTextFlags) const { return String(); }
+    virtual void setIsTrackingDisplayListReplay(bool isTracking) { m_isTrackingDisplayListReplay = isTracking; }
+    virtual bool isTrackingDisplayListReplay() const { return m_isTrackingDisplayListReplay; }
+    virtual String replayDisplayListAsText(DisplayList::AsTextFlags) const { return String(); }
 
     // Return an estimate of the backing store memory cost (in bytes). May be incorrect for tiled layers.
     WEBCORE_EXPORT virtual double backingStoreMemoryEstimate() const;
index 5b812da..9aa955f 100644 (file)
@@ -47,30 +47,30 @@ class WEBCORE_EXPORT PlaybackSessionInterfaceMac final
 public:
     static Ref<PlaybackSessionInterfaceMac> create(PlaybackSessionModel&);
     virtual ~PlaybackSessionInterfaceMac();
-    PlaybackSessionModel* playbackSessionModel() const { return m_playbackSessionModel; }
+    PlaybackSessionModel* playbackSessionModel() const;
 
     // PlaybackSessionInterface
-    WEBCORE_EXPORT void resetMediaState() final { }
+    void resetMediaState() final;
 
     // PlaybackSessionModelClient
-    WEBCORE_EXPORT void durationChanged(double) final;
-    WEBCORE_EXPORT void currentTimeChanged(double /*currentTime*/, double /*anchorTime*/) final;
-    WEBCORE_EXPORT void rateChanged(bool /*isPlaying*/, float /*playbackRate*/) final;
-    WEBCORE_EXPORT void seekableRangesChanged(const TimeRanges&, double /*lastModifiedTime*/, double /*liveUpdateInterval*/) final;
-    WEBCORE_EXPORT void audioMediaSelectionOptionsChanged(const Vector<MediaSelectionOption>& /*options*/, uint64_t /*selectedIndex*/) final;
-    WEBCORE_EXPORT void legibleMediaSelectionOptionsChanged(const Vector<MediaSelectionOption>& /*options*/, uint64_t /*selectedIndex*/) final;
-    WEBCORE_EXPORT void audioMediaSelectionIndexChanged(uint64_t) final;
-    WEBCORE_EXPORT void legibleMediaSelectionIndexChanged(uint64_t) final;
-    WEBCORE_EXPORT void externalPlaybackChanged(bool /* enabled */, PlaybackSessionModel::ExternalPlaybackTargetType, const String& /* localizedDeviceName */) final;
+    void durationChanged(double) final;
+    void currentTimeChanged(double /*currentTime*/, double /*anchorTime*/) final;
+    void rateChanged(bool /*isPlaying*/, float /*playbackRate*/) final;
+    void seekableRangesChanged(const TimeRanges&, double /*lastModifiedTime*/, double /*liveUpdateInterval*/) final;
+    void audioMediaSelectionOptionsChanged(const Vector<MediaSelectionOption>& /*options*/, uint64_t /*selectedIndex*/) final;
+    void legibleMediaSelectionOptionsChanged(const Vector<MediaSelectionOption>& /*options*/, uint64_t /*selectedIndex*/) final;
+    void audioMediaSelectionIndexChanged(uint64_t) final;
+    void legibleMediaSelectionIndexChanged(uint64_t) final;
+    void externalPlaybackChanged(bool /* enabled */, PlaybackSessionModel::ExternalPlaybackTargetType, const String& /* localizedDeviceName */) final;
 
-    WEBCORE_EXPORT void invalidate();
-    WEBCORE_EXPORT void ensureControlsManager();
+    void invalidate();
+    void ensureControlsManager();
 #if ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
-    WEBCORE_EXPORT void setPlayBackControlsManager(WebPlaybackControlsManager *);
-    WEBCORE_EXPORT WebPlaybackControlsManager *playBackControlsManager();
+    void setPlayBackControlsManager(WebPlaybackControlsManager *);
+    WebPlaybackControlsManager *playBackControlsManager();
 #endif
-    WEBCORE_EXPORT void beginScrubbing();
-    WEBCORE_EXPORT void endScrubbing();
+    void beginScrubbing();
+    void endScrubbing();
 
 private:
     PlaybackSessionInterfaceMac(PlaybackSessionModel&);
index b43219d..602eddb 100644 (file)
@@ -61,6 +61,15 @@ PlaybackSessionInterfaceMac::~PlaybackSessionInterfaceMac()
     invalidate();
 }
 
+PlaybackSessionModel* PlaybackSessionInterfaceMac::playbackSessionModel() const
+{
+    return m_playbackSessionModel;
+}
+
+void PlaybackSessionInterfaceMac::resetMediaState()
+{
+}
+
 void PlaybackSessionInterfaceMac::durationChanged(double duration)
 {
 #if ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
index 61ff0ea..ef7b3cf 100644 (file)
@@ -71,8 +71,8 @@ public:
     
     const RealtimeMediaSourceSupportedConstraints& supportedConstraints() { return m_supportedConstraints; }
 
-    WEBCORE_EXPORT virtual void setAudioFactory(RealtimeMediaSource::AudioCaptureFactory&) { }
-    WEBCORE_EXPORT virtual void unsetAudioFactory(RealtimeMediaSource::AudioCaptureFactory&) { }
+    virtual void setAudioFactory(RealtimeMediaSource::AudioCaptureFactory&) { }
+    virtual void unsetAudioFactory(RealtimeMediaSource::AudioCaptureFactory&) { }
     WEBCORE_EXPORT virtual RealtimeMediaSource::AudioCaptureFactory& audioFactory() = 0;
 
     virtual RealtimeMediaSource::VideoCaptureFactory& videoFactory() = 0;
index 0e48ddd..f2363ba 100644 (file)
@@ -51,6 +51,10 @@ UniqueRef<LibWebRTCProvider> LibWebRTCProvider::create()
 }
 #endif
 
+void LibWebRTCProvider::setActive(bool)
+{
+}
+
 #if USE(LIBWEBRTC)
 static inline rtc::SocketAddress prepareSocketAddress(const rtc::SocketAddress& address, bool disableNonLocalhostConnections)
 {
@@ -195,11 +199,31 @@ rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> LibWebRTCProvider::cr
     return webrtc::CreatePeerConnectionFactory(networkThread, networkThread, signalingThread, audioModule, webrtc::CreateBuiltinAudioEncoderFactory(), webrtc::CreateBuiltinAudioDecoderFactory(), createEncoderFactory(), createDecoderFactory(), nullptr, nullptr);
 }
 
+std::unique_ptr<webrtc::VideoDecoderFactory> LibWebRTCProvider::createDecoderFactory()
+{
+    return nullptr;
+}
+
+std::unique_ptr<webrtc::VideoEncoderFactory> LibWebRTCProvider::createEncoderFactory()
+{
+    return nullptr;
+}
+
 void LibWebRTCProvider::setPeerConnectionFactory(rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface>&& factory)
 {
     m_factory = webrtc::PeerConnectionFactoryProxy::Create(getStaticFactoryAndThreads(m_useNetworkThreadWithSocketServer).signalingThread.get(), WTFMove(factory));
 }
 
+void LibWebRTCProvider::disableEnumeratingAllNetworkInterfaces()
+{
+    m_enableEnumeratingAllNetworkInterfaces = false;
+}
+
+void LibWebRTCProvider::enableEnumeratingAllNetworkInterfaces()
+{
+    m_enableEnumeratingAllNetworkInterfaces = true;
+}
+
 rtc::scoped_refptr<webrtc::PeerConnectionInterface> LibWebRTCProvider::createPeerConnection(webrtc::PeerConnectionObserver& observer, webrtc::PeerConnectionInterface::RTCConfiguration&& configuration)
 {
     // Default WK1 implementation.
index 9d2d13a..0b4b9bd 100644 (file)
@@ -67,7 +67,7 @@ public:
 
     static bool webRTCAvailable();
 
-    virtual void setActive(bool) { };
+    virtual void setActive(bool);
 
     virtual void setH264HardwareEncoderAllowed(bool) { }
 
@@ -104,8 +104,8 @@ public:
     // Used for mock testing
     void setPeerConnectionFactory(rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface>&&);
 
-    void disableEnumeratingAllNetworkInterfaces() { m_enableEnumeratingAllNetworkInterfaces = false; }
-    void enableEnumeratingAllNetworkInterfaces() { m_enableEnumeratingAllNetworkInterfaces = true; }
+    void disableEnumeratingAllNetworkInterfaces();
+    void enableEnumeratingAllNetworkInterfaces();
 
     virtual void disableNonLocalhostConnections() { m_disableNonLocalhostConnections = true; }
 
@@ -115,8 +115,8 @@ protected:
     rtc::scoped_refptr<webrtc::PeerConnectionInterface> createPeerConnection(webrtc::PeerConnectionObserver&, rtc::NetworkManager&, rtc::PacketSocketFactory&, webrtc::PeerConnectionInterface::RTCConfiguration&&);
 
     rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> createPeerConnectionFactory(rtc::Thread* networkThread, rtc::Thread* signalingThread, LibWebRTCAudioModule*);
-    virtual std::unique_ptr<webrtc::VideoDecoderFactory> createDecoderFactory() { return nullptr; }
-    virtual std::unique_ptr<webrtc::VideoEncoderFactory> createEncoderFactory() { return nullptr; }
+    virtual std::unique_ptr<webrtc::VideoDecoderFactory> createDecoderFactory();
+    virtual std::unique_ptr<webrtc::VideoEncoderFactory> createEncoderFactory();
 
     bool m_enableEnumeratingAllNetworkInterfaces { false };
     // FIXME: Remove m_useNetworkThreadWithSocketServer member variable and make it a global.
index 676e74e..d6edb6d 100644 (file)
@@ -84,9 +84,9 @@ public:
 #endif
 
 #if USE(CFURLCONNECTION)
-    WEBCORE_EXPORT virtual void willCacheResponseAsync(ResourceHandle*, CFCachedURLResponseRef response, CompletionHandler<void(CFCachedURLResponseRef)>&& completionHandler) { completionHandler(response); }
+    virtual void willCacheResponseAsync(ResourceHandle*, CFCachedURLResponseRef response, CompletionHandler<void(CFCachedURLResponseRef)>&& completionHandler) { completionHandler(response); }
 #elif PLATFORM(COCOA)
-    WEBCORE_EXPORT virtual void willCacheResponseAsync(ResourceHandle*, NSCachedURLResponse *response, CompletionHandler<void(NSCachedURLResponse *)>&& completionHandler) { completionHandler(response); }
+    virtual void willCacheResponseAsync(ResourceHandle*, NSCachedURLResponse *response, CompletionHandler<void(NSCachedURLResponse *)>&& completionHandler) { completionHandler(response); }
 #endif
 
     virtual bool shouldUseCredentialStorage(ResourceHandle*) { return false; }
index 4e790a2..40419b9 100644 (file)
@@ -41,7 +41,7 @@ public:
 
     WEBCORE_EXPORT void startMonitoringGamepads(GamepadProviderClient&) final;
     WEBCORE_EXPORT void stopMonitoringGamepads(GamepadProviderClient&) final;
-    WEBCORE_EXPORT const Vector<PlatformGamepad*>& platformGamepads() final { return m_connectedGamepadVector; }
+    const Vector<PlatformGamepad*>& platformGamepads() final { return m_connectedGamepadVector; }
     bool isMockGamepadProvider() const final { return true; }
 
     void setMockGamepadDetails(unsigned index, const String& gamepadID, unsigned axisCount, unsigned buttonCount);
index c913094..bfc9822 100644 (file)
@@ -69,7 +69,7 @@ public:
         WTF_MAKE_FAST_ALLOCATED;
         friend class SWServer;
     public:
-        WEBCORE_EXPORT virtual ~Connection() { }
+        virtual ~Connection() = default;
 
         using Identifier = SWServerConnectionIdentifier;
         Identifier identifier() const { return m_identifier; }