- Revision
- 233990
- Author
- [email protected]
- Date
- 2018-07-19 10:43:35 -0700 (Thu, 19 Jul 2018)
Log Message
Adjust WEBCORE_EXPORT annotations for LTO
https://bugs.webkit.org/show_bug.cgi?id=187781
<rdar://problem/42351124>
Reviewed by Alex Christensen.
Continuation of Bug 186944. This bug addresses issues not caught
during the first pass of adjustments. The initial work focussed on
macOS; this one addresses issues found when building for iOS. From
186944:
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.
Source/_javascript_Core:
* inspector/remote/RemoteAutomationTarget.cpp:
(Inspector::RemoteAutomationTarget::~RemoteAutomationTarget):
* inspector/remote/RemoteAutomationTarget.h:
* inspector/remote/RemoteInspector.cpp:
(Inspector::RemoteInspector::Client::~Client):
* inspector/remote/RemoteInspector.h:
Source/WebCore:
No new tests. There is no changed functionality. Only the annotation
and treatment of inline methods are altered.
* platform/graphics/FourCC.h:
(WebCore::FourCC::FourCC):
* platform/graphics/IntPoint.h:
(WebCore::IntPoint::IntPoint):
* platform/mediastream/RealtimeMediaSource.cpp:
(WebCore::RealtimeMediaSource::Observer::~Observer):
(WebCore::RealtimeMediaSource::AudioCaptureFactory::~AudioCaptureFactory):
(WebCore::RealtimeMediaSource::VideoCaptureFactory::~VideoCaptureFactory):
* platform/mediastream/RealtimeMediaSource.h:
* workers/service/ServiceWorkerProvider.cpp:
(WebCore::ServiceWorkerProvider::~ServiceWorkerProvider):
* workers/service/ServiceWorkerProvider.h:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (233989 => 233990)
--- trunk/Source/_javascript_Core/ChangeLog 2018-07-19 17:37:17 UTC (rev 233989)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-07-19 17:43:35 UTC (rev 233990)
@@ -1,3 +1,45 @@
+2018-07-19 Keith Rollin <[email protected]>
+
+ Adjust WEBCORE_EXPORT annotations for LTO
+ https://bugs.webkit.org/show_bug.cgi?id=187781
+ <rdar://problem/42351124>
+
+ Reviewed by Alex Christensen.
+
+ Continuation of Bug 186944. This bug addresses issues not caught
+ during the first pass of adjustments. The initial work focussed on
+ macOS; this one addresses issues found when building for iOS. From
+ 186944:
+
+ 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.
+
+ * inspector/remote/RemoteAutomationTarget.cpp:
+ (Inspector::RemoteAutomationTarget::~RemoteAutomationTarget):
+ * inspector/remote/RemoteAutomationTarget.h:
+ * inspector/remote/RemoteInspector.cpp:
+ (Inspector::RemoteInspector::Client::~Client):
+ * inspector/remote/RemoteInspector.h:
+
2018-07-19 Yusuke Suzuki <[email protected]>
Unreviewed, check scope after performing getPropertySlot in JSON.stringify
Modified: trunk/Source/_javascript_Core/inspector/remote/RemoteAutomationTarget.cpp (233989 => 233990)
--- trunk/Source/_javascript_Core/inspector/remote/RemoteAutomationTarget.cpp 2018-07-19 17:37:17 UTC (rev 233989)
+++ trunk/Source/_javascript_Core/inspector/remote/RemoteAutomationTarget.cpp 2018-07-19 17:43:35 UTC (rev 233990)
@@ -32,6 +32,10 @@
namespace Inspector {
+RemoteAutomationTarget::~RemoteAutomationTarget()
+{
+}
+
void RemoteAutomationTarget::setIsPaired(bool paired)
{
if (m_paired == paired)
Modified: trunk/Source/_javascript_Core/inspector/remote/RemoteAutomationTarget.h (233989 => 233990)
--- trunk/Source/_javascript_Core/inspector/remote/RemoteAutomationTarget.h 2018-07-19 17:37:17 UTC (rev 233989)
+++ trunk/Source/_javascript_Core/inspector/remote/RemoteAutomationTarget.h 2018-07-19 17:43:35 UTC (rev 233990)
@@ -36,7 +36,7 @@
class JS_EXPORT_PRIVATE RemoteAutomationTarget : public RemoteControllableTarget {
public:
- virtual ~RemoteAutomationTarget() { }
+ virtual ~RemoteAutomationTarget();
bool isPaired() const { return m_paired; }
void setIsPaired(bool);
Modified: trunk/Source/_javascript_Core/inspector/remote/RemoteInspector.cpp (233989 => 233990)
--- trunk/Source/_javascript_Core/inspector/remote/RemoteInspector.cpp 2018-07-19 17:37:17 UTC (rev 233989)
+++ trunk/Source/_javascript_Core/inspector/remote/RemoteInspector.cpp 2018-07-19 17:43:35 UTC (rev 233990)
@@ -240,6 +240,10 @@
// Legacy iOS WebKit 1 had a notification. This will need to be smarter with WebKit2.
}
+RemoteInspector::Client::~Client()
+{
+}
+
} // namespace Inspector
#endif // ENABLE(REMOTE_INSPECTOR)
Modified: trunk/Source/_javascript_Core/inspector/remote/RemoteInspector.h (233989 => 233990)
--- trunk/Source/_javascript_Core/inspector/remote/RemoteInspector.h 2018-07-19 17:37:17 UTC (rev 233989)
+++ trunk/Source/_javascript_Core/inspector/remote/RemoteInspector.h 2018-07-19 17:43:35 UTC (rev 233990)
@@ -84,7 +84,7 @@
#endif
};
- virtual ~Client() { }
+ virtual ~Client();
virtual bool remoteAutomationAllowed() const = 0;
virtual String browserName() const { return { }; }
virtual String browserVersion() const { return { }; }
Modified: trunk/Source/WebCore/ChangeLog (233989 => 233990)
--- trunk/Source/WebCore/ChangeLog 2018-07-19 17:37:17 UTC (rev 233989)
+++ trunk/Source/WebCore/ChangeLog 2018-07-19 17:43:35 UTC (rev 233990)
@@ -1,3 +1,54 @@
+2018-07-19 Keith Rollin <[email protected]>
+
+ Adjust WEBCORE_EXPORT annotations for LTO
+ https://bugs.webkit.org/show_bug.cgi?id=187781
+ <rdar://problem/42351124>
+
+ Reviewed by Alex Christensen.
+
+ Continuation of Bug 186944. This bug addresses issues not caught
+ during the first pass of adjustments. The initial work focussed on
+ macOS; this one addresses issues found when building for iOS. From
+ 186944:
+
+ 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.
+
+ * platform/graphics/FourCC.h:
+ (WebCore::FourCC::FourCC):
+ * platform/graphics/IntPoint.h:
+ (WebCore::IntPoint::IntPoint):
+ * platform/mediastream/RealtimeMediaSource.cpp:
+ (WebCore::RealtimeMediaSource::Observer::~Observer):
+ (WebCore::RealtimeMediaSource::AudioCaptureFactory::~AudioCaptureFactory):
+ (WebCore::RealtimeMediaSource::VideoCaptureFactory::~VideoCaptureFactory):
+ * platform/mediastream/RealtimeMediaSource.h:
+ * workers/service/ServiceWorkerProvider.cpp:
+ (WebCore::ServiceWorkerProvider::~ServiceWorkerProvider):
+ * workers/service/ServiceWorkerProvider.h:
+
2018-07-19 Charlie Turner <[email protected]>
[GStreamer] Return a valid time values in unprerolled states
Modified: trunk/Source/WebCore/platform/graphics/FourCC.h (233989 => 233990)
--- trunk/Source/WebCore/platform/graphics/FourCC.h 2018-07-19 17:37:17 UTC (rev 233989)
+++ trunk/Source/WebCore/platform/graphics/FourCC.h 2018-07-19 17:43:35 UTC (rev 233990)
@@ -30,7 +30,7 @@
namespace WebCore {
struct FourCC {
- WEBCORE_EXPORT FourCC(uint32_t value) : value(value) { }
+ FourCC(uint32_t value) : value(value) { }
template<std::size_t N>
constexpr FourCC(const char (&data)[N])
Modified: trunk/Source/WebCore/platform/graphics/IntPoint.h (233989 => 233990)
--- trunk/Source/WebCore/platform/graphics/IntPoint.h 2018-07-19 17:37:17 UTC (rev 233989)
+++ trunk/Source/WebCore/platform/graphics/IntPoint.h 2018-07-19 17:43:35 UTC (rev 233990)
@@ -70,7 +70,7 @@
public:
IntPoint() : m_x(0), m_y(0) { }
IntPoint(int x, int y) : m_x(x), m_y(y) { }
- WEBCORE_EXPORT explicit IntPoint(const IntSize& size) : m_x(size.width()), m_y(size.height()) { }
+ explicit IntPoint(const IntSize& size) : m_x(size.width()), m_y(size.height()) { }
WEBCORE_EXPORT explicit IntPoint(const FloatPoint&); // don't do this implicitly since it's lossy
static IntPoint zero() { return IntPoint(); }
Modified: trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp (233989 => 233990)
--- trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp 2018-07-19 17:37:17 UTC (rev 233989)
+++ trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp 2018-07-19 17:43:35 UTC (rev 233990)
@@ -924,6 +924,18 @@
});
}
+RealtimeMediaSource::Observer::~Observer()
+{
+}
+
+RealtimeMediaSource::AudioCaptureFactory::~AudioCaptureFactory()
+{
+}
+
+RealtimeMediaSource::VideoCaptureFactory::~VideoCaptureFactory()
+{
+}
+
} // namespace WebCore
#endif // ENABLE(MEDIA_STREAM)
Modified: trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.h (233989 => 233990)
--- trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.h 2018-07-19 17:37:17 UTC (rev 233989)
+++ trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.h 2018-07-19 17:43:35 UTC (rev 233990)
@@ -66,7 +66,7 @@
public:
class Observer {
public:
- virtual ~Observer() = default;
+ virtual ~Observer();
// Source state changes.
virtual void sourceStarted() { }
@@ -112,7 +112,7 @@
#endif
{
public:
- virtual ~AudioCaptureFactory() = default;
+ virtual ~AudioCaptureFactory();
virtual CaptureSourceOrError createAudioCaptureSource(const CaptureDevice&, const MediaConstraints*) = 0;
protected:
@@ -125,7 +125,7 @@
#endif
{
public:
- virtual ~VideoCaptureFactory() = default;
+ virtual ~VideoCaptureFactory();
virtual CaptureSourceOrError createVideoCaptureSource(const CaptureDevice&, const MediaConstraints*) = 0;
virtual void setVideoCapturePageState(bool, bool) { }
Modified: trunk/Source/WebCore/workers/service/ServiceWorkerProvider.cpp (233989 => 233990)
--- trunk/Source/WebCore/workers/service/ServiceWorkerProvider.cpp 2018-07-19 17:37:17 UTC (rev 233989)
+++ trunk/Source/WebCore/workers/service/ServiceWorkerProvider.cpp 2018-07-19 17:43:35 UTC (rev 233990)
@@ -34,6 +34,10 @@
static ServiceWorkerProvider* sharedProvider;
+ServiceWorkerProvider::~ServiceWorkerProvider()
+{
+}
+
ServiceWorkerProvider& ServiceWorkerProvider::singleton()
{
RELEASE_ASSERT(sharedProvider);
Modified: trunk/Source/WebCore/workers/service/ServiceWorkerProvider.h (233989 => 233990)
--- trunk/Source/WebCore/workers/service/ServiceWorkerProvider.h 2018-07-19 17:37:17 UTC (rev 233989)
+++ trunk/Source/WebCore/workers/service/ServiceWorkerProvider.h 2018-07-19 17:43:35 UTC (rev 233990)
@@ -39,7 +39,7 @@
class WEBCORE_EXPORT ServiceWorkerProvider {
public:
- virtual ~ServiceWorkerProvider() = default;
+ virtual ~ServiceWorkerProvider();
WEBCORE_EXPORT static ServiceWorkerProvider& singleton();
WEBCORE_EXPORT static void setSharedProvider(ServiceWorkerProvider&);