Title: [233189] trunk/Source/WebCore
Revision
233189
Author
krol...@apple.com
Date
2018-06-25 19:05:35 -0700 (Mon, 25 Jun 2018)

Log Message

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (233188 => 233189)


--- trunk/Source/WebCore/ChangeLog	2018-06-26 01:22:10 UTC (rev 233188)
+++ trunk/Source/WebCore/ChangeLog	2018-06-26 02:05:35 UTC (rev 233189)
@@ -1,3 +1,78 @@
+2018-06-25  Keith Rollin  <krol...@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  <za...@apple.com>
 
         [LFC] Adjust static position for out-of-flow positioned boxes.

Modified: trunk/Source/WebCore/animation/AnimationTimeline.h (233188 => 233189)


--- trunk/Source/WebCore/animation/AnimationTimeline.h	2018-06-26 01:22:10 UTC (rev 233188)
+++ trunk/Source/WebCore/animation/AnimationTimeline.h	2018-06-26 02:05:35 UTC (rev 233189)
@@ -53,7 +53,7 @@
     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() { };
 

Modified: trunk/Source/WebCore/page/CacheStorageProvider.h (233188 => 233189)


--- trunk/Source/WebCore/page/CacheStorageProvider.h	2018-06-26 01:22:10 UTC (rev 233188)
+++ trunk/Source/WebCore/page/CacheStorageProvider.h	2018-06-26 02:05:35 UTC (rev 233189)
@@ -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(); }

Modified: trunk/Source/WebCore/page/scrolling/ScrollingTree.h (233188 => 233189)


--- trunk/Source/WebCore/page/scrolling/ScrollingTree.h	2018-06-26 01:22:10 UTC (rev 233188)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTree.h	2018-06-26 02:05:35 UTC (rev 233189)
@@ -91,8 +91,8 @@
     // 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();
     

Modified: trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.h (233188 => 233189)


--- trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.h	2018-06-26 01:22:10 UTC (rev 233188)
+++ trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.h	2018-06-26 02:05:35 UTC (rev 233189)
@@ -55,12 +55,12 @@
     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; }

Modified: trunk/Source/WebCore/platform/audio/mac/CARingBuffer.cpp (233188 => 233189)


--- trunk/Source/WebCore/platform/audio/mac/CARingBuffer.cpp	2018-06-26 01:22:10 UTC (rev 233188)
+++ trunk/Source/WebCore/platform/audio/mac/CARingBuffer.cpp	2018-06-26 02:05:35 UTC (rev 233189)
@@ -44,6 +44,11 @@
 {
 }
 
+CARingBuffer::~CARingBuffer()
+{
+    deallocate();
+}
+
 CARingBuffer::CARingBuffer(UniqueRef<CARingBufferStorage>&& storage)
     : m_buffers(WTFMove(storage))
     , m_timeBoundsQueue(kGeneralRingTimeBoundsQueueSize)

Modified: trunk/Source/WebCore/platform/audio/mac/CARingBuffer.h (233188 => 233189)


--- trunk/Source/WebCore/platform/audio/mac/CARingBuffer.h	2018-06-26 01:22:10 UTC (rev 233188)
+++ trunk/Source/WebCore/platform/audio/mac/CARingBuffer.h	2018-06-26 02:05:35 UTC (rev 233189)
@@ -61,10 +61,7 @@
 public:
     WEBCORE_EXPORT CARingBuffer();
     WEBCORE_EXPORT CARingBuffer(UniqueRef<CARingBufferStorage>&&);
-    WEBCORE_EXPORT ~CARingBuffer()
-    {
-        deallocate();
-    }
+    WEBCORE_EXPORT ~CARingBuffer();
 
     enum Error {
         Ok,

Modified: trunk/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.h (233188 => 233189)


--- trunk/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.h	2018-06-26 01:22:10 UTC (rev 233188)
+++ trunk/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.h	2018-06-26 02:05:35 UTC (rev 233189)
@@ -69,8 +69,8 @@
     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:

Modified: trunk/Source/WebCore/platform/gamepad/GamepadProvider.h (233188 => 233189)


--- trunk/Source/WebCore/platform/gamepad/GamepadProvider.h	2018-06-26 01:22:10 UTC (rev 233188)
+++ trunk/Source/WebCore/platform/gamepad/GamepadProvider.h	2018-06-26 02:05:35 UTC (rev 233189)
@@ -35,7 +35,7 @@
 class GamepadProviderClient;
 class PlatformGamepad;
 
-class WEBCORE_EXPORT GamepadProvider {
+class GamepadProvider {
 public:
     virtual ~GamepadProvider() = default;
 
@@ -48,7 +48,7 @@
     virtual bool isMockGamepadProvider() const { return false; }
 
 protected:
-    void dispatchPlatformGamepadInputActivity();
+    WEBCORE_EXPORT void dispatchPlatformGamepadInputActivity();
     void setShouldMakeGamepadsVisibile() { m_shouldMakeGamepadsVisible = true; }
     HashSet<GamepadProviderClient*> m_clients;
 

Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.h (233188 => 233189)


--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.h	2018-06-26 01:22:10 UTC (rev 233188)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.h	2018-06-26 02:05:35 UTC (rev 233189)
@@ -542,11 +542,11 @@
     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;

Modified: trunk/Source/WebCore/platform/mac/PlaybackSessionInterfaceMac.h (233188 => 233189)


--- trunk/Source/WebCore/platform/mac/PlaybackSessionInterfaceMac.h	2018-06-26 01:22:10 UTC (rev 233188)
+++ trunk/Source/WebCore/platform/mac/PlaybackSessionInterfaceMac.h	2018-06-26 02:05:35 UTC (rev 233189)
@@ -47,30 +47,30 @@
 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&);

Modified: trunk/Source/WebCore/platform/mac/PlaybackSessionInterfaceMac.mm (233188 => 233189)


--- trunk/Source/WebCore/platform/mac/PlaybackSessionInterfaceMac.mm	2018-06-26 01:22:10 UTC (rev 233188)
+++ trunk/Source/WebCore/platform/mac/PlaybackSessionInterfaceMac.mm	2018-06-26 02:05:35 UTC (rev 233189)
@@ -61,6 +61,15 @@
     invalidate();
 }
 
+PlaybackSessionModel* PlaybackSessionInterfaceMac::playbackSessionModel() const
+{
+    return m_playbackSessionModel;
+}
+
+void PlaybackSessionInterfaceMac::resetMediaState()
+{
+}
+
 void PlaybackSessionInterfaceMac::durationChanged(double duration)
 {
 #if ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)

Modified: trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.h (233188 => 233189)


--- trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.h	2018-06-26 01:22:10 UTC (rev 233188)
+++ trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.h	2018-06-26 02:05:35 UTC (rev 233189)
@@ -71,8 +71,8 @@
     
     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;

Modified: trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp (233188 => 233189)


--- trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp	2018-06-26 01:22:10 UTC (rev 233188)
+++ trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp	2018-06-26 02:05:35 UTC (rev 233189)
@@ -51,6 +51,10 @@
 }
 #endif
 
+void LibWebRTCProvider::setActive(bool)
+{
+}
+
 #if USE(LIBWEBRTC)
 static inline rtc::SocketAddress prepareSocketAddress(const rtc::SocketAddress& address, bool disableNonLocalhostConnections)
 {
@@ -195,11 +199,31 @@
     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.

Modified: trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h (233188 => 233189)


--- trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h	2018-06-26 01:22:10 UTC (rev 233188)
+++ trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h	2018-06-26 02:05:35 UTC (rev 233189)
@@ -67,7 +67,7 @@
 
     static bool webRTCAvailable();
 
-    virtual void setActive(bool) { };
+    virtual void setActive(bool);
 
     virtual void setH264HardwareEncoderAllowed(bool) { }
 
@@ -104,8 +104,8 @@
     // 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 @@
     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.

Modified: trunk/Source/WebCore/platform/network/ResourceHandleClient.h (233188 => 233189)


--- trunk/Source/WebCore/platform/network/ResourceHandleClient.h	2018-06-26 01:22:10 UTC (rev 233188)
+++ trunk/Source/WebCore/platform/network/ResourceHandleClient.h	2018-06-26 02:05:35 UTC (rev 233189)
@@ -84,9 +84,9 @@
 #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; }

Modified: trunk/Source/WebCore/testing/MockGamepadProvider.h (233188 => 233189)


--- trunk/Source/WebCore/testing/MockGamepadProvider.h	2018-06-26 01:22:10 UTC (rev 233188)
+++ trunk/Source/WebCore/testing/MockGamepadProvider.h	2018-06-26 02:05:35 UTC (rev 233189)
@@ -41,7 +41,7 @@
 
     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);

Modified: trunk/Source/WebCore/workers/service/server/SWServer.h (233188 => 233189)


--- trunk/Source/WebCore/workers/service/server/SWServer.h	2018-06-26 01:22:10 UTC (rev 233188)
+++ trunk/Source/WebCore/workers/service/server/SWServer.h	2018-06-26 02:05:35 UTC (rev 233189)
@@ -69,7 +69,7 @@
         WTF_MAKE_FAST_ALLOCATED;
         friend class SWServer;
     public:
-        WEBCORE_EXPORT virtual ~Connection() { }
+        virtual ~Connection() = default;
 
         using Identifier = SWServerConnectionIdentifier;
         Identifier identifier() const { return m_identifier; }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to