Fix build for future versions of Clang.
authorkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Sep 2016 18:24:43 +0000 (18:24 +0000)
committerkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Sep 2016 18:24:43 +0000 (18:24 +0000)
https://bugs.webkit.org/show_bug.cgi?id=162346

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

This fixes issues with the WebCore build where inline
template-class function definitions are marked as exported. This
genereates a weak external symobl that our build does not like.

* runtime/VM.h:
(JSC::VM::setGlobalConstRedeclarationShouldThrow):

Source/WebCore:

This fixes issues with the WebCore build where inline
template-class function definitions are marked as exported. This
genereates a weak external symobl that our build does not like.

* Configurations/WebCore.unexp:
* dom/Exception.h:
* page/Frame.h:
* platform/cocoa/WebPlaybackSessionModelMediaElement.h:
* platform/cocoa/WebVideoFullscreenModelVideoElement.h:
(WebCore::WebVideoFullscreenModelVideoElement::videoElement):
* platform/graphics/Color.h:
* platform/graphics/transforms/TransformationMatrix.h:
(WebCore::TransformationMatrix::rotate):
* platform/mac/WebVideoFullscreenInterfaceMac.h:
* platform/network/ParsedContentRange.h:
(WebCore::ParsedContentRange::ParsedContentRange):
(WebCore::ParsedContentRange::isValid):
* platform/network/ResourceResponseBase.h:
(WebCore::ResourceResponseBase::certificateInfo):
* platform/text/TextStream.h:
(WebCore::TextStream::increaseIndent):
(WebCore::TextStream::decreaseIndent):

Source/WTF:

This fixes issues with the WebCore build where inline
template-class function definitions are marked as exported. This
genereates a weak external symobl that our build does not like.

* wtf/text/StringImpl.h:

Tools:

* TestWebKitAPI/Counters.cpp:
* TestWebKitAPI/Counters.h:
(DeleterCounter::deleterCount):
(DeleterCounter::TestingScope::TestingScope):
(DeleterCounter::operator()):
* TestWebKitAPI/Tests/WTF/HashCountedSet.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/HashMap.cpp:
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206222 268f45cc-cd09-0410-ab3c-d52691b4dbfc

21 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/VM.h
Source/WTF/ChangeLog
Source/WTF/wtf/text/StringImpl.h
Source/WebCore/ChangeLog
Source/WebCore/Configurations/WebCore.unexp
Source/WebCore/dom/Exception.h
Source/WebCore/page/Frame.h
Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.h
Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.h
Source/WebCore/platform/graphics/Color.h
Source/WebCore/platform/graphics/transforms/TransformationMatrix.h
Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h
Source/WebCore/platform/network/ParsedContentRange.h
Source/WebCore/platform/network/ResourceResponseBase.h
Source/WebCore/platform/text/TextStream.h
Tools/ChangeLog
Tools/TestWebKitAPI/Counters.cpp
Tools/TestWebKitAPI/Counters.h
Tools/TestWebKitAPI/Tests/WTF/HashCountedSet.cpp
Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp

index 15c4442..5f7b29d 100644 (file)
@@ -1,3 +1,18 @@
+2016-09-21  Keith Miller  <keith_miller@apple.com>
+
+        Fix build for future versions of Clang.
+        https://bugs.webkit.org/show_bug.cgi?id=162346
+
+        Reviewed by Filip Pizlo.
+
+        This fixes issues with the WebCore build where inline
+        template-class function definitions are marked as exported. This
+        genereates a weak external symobl that our build does not like.
+
+
+        * runtime/VM.h:
+        (JSC::VM::setGlobalConstRedeclarationShouldThrow):
+
 2016-09-21  Chris Dumez  <cdumez@apple.com>
 
         Object.getOwnPropertyDescriptor() does not work correctly cross origin
index a3ac19d..198d1e9 100644 (file)
@@ -616,7 +616,7 @@ public:
 
     JS_EXPORT_PRIVATE void queueMicrotask(JSGlobalObject*, PassRefPtr<Microtask>);
     JS_EXPORT_PRIVATE void drainMicrotasks();
-    JS_EXPORT_PRIVATE void setGlobalConstRedeclarationShouldThrow(bool globalConstRedeclarationThrow) { m_globalConstRedeclarationShouldThrow = globalConstRedeclarationThrow; }
+    void setGlobalConstRedeclarationShouldThrow(bool globalConstRedeclarationThrow) { m_globalConstRedeclarationShouldThrow = globalConstRedeclarationThrow; }
     ALWAYS_INLINE bool globalConstRedeclarationShouldThrow() const { return m_globalConstRedeclarationShouldThrow; }
 
     inline bool shouldTriggerTermination(ExecState*);
index c11d136..82bb65e 100644 (file)
@@ -1,3 +1,16 @@
+2016-09-21  Keith Miller  <keith_miller@apple.com>
+
+        Fix build for future versions of Clang.
+        https://bugs.webkit.org/show_bug.cgi?id=162346
+
+        Reviewed by Filip Pizlo.
+
+        This fixes issues with the WebCore build where inline
+        template-class function definitions are marked as exported. This
+        genereates a weak external symobl that our build does not like.
+
+        * wtf/text/StringImpl.h:
+
 2016-09-20  Alex Christensen  <achristensen@webkit.org>
 
         Require WTFMove for String::adopt
index ecc32af..421a923 100644 (file)
@@ -948,8 +948,8 @@ WTF_EXPORT_STRING_API bool equalIgnoringNullity(const UChar*, size_t length, Str
 
 bool equalIgnoringASCIICase(const StringImpl&, const StringImpl&);
 WTF_EXPORT_STRING_API bool equalIgnoringASCIICase(const StringImpl*, const StringImpl*);
-WTF_EXPORT_STRING_API bool equalIgnoringASCIICase(const StringImpl&, const char*);
-WTF_EXPORT_STRING_API bool equalIgnoringASCIICase(const StringImpl*, const char*);
+bool equalIgnoringASCIICase(const StringImpl&, const char*);
+bool equalIgnoringASCIICase(const StringImpl*, const char*);
 
 WTF_EXPORT_STRING_API bool equalIgnoringASCIICaseNonNull(const StringImpl*, const StringImpl*);
 
index da46a3e..4362020 100644 (file)
@@ -1,3 +1,33 @@
+2016-09-21  Keith Miller  <keith_miller@apple.com>
+
+        Fix build for future versions of Clang.
+        https://bugs.webkit.org/show_bug.cgi?id=162346
+
+        Reviewed by Filip Pizlo.
+
+        This fixes issues with the WebCore build where inline
+        template-class function definitions are marked as exported. This
+        genereates a weak external symobl that our build does not like.
+
+        * Configurations/WebCore.unexp:
+        * dom/Exception.h:
+        * page/Frame.h:
+        * platform/cocoa/WebPlaybackSessionModelMediaElement.h:
+        * platform/cocoa/WebVideoFullscreenModelVideoElement.h:
+        (WebCore::WebVideoFullscreenModelVideoElement::videoElement):
+        * platform/graphics/Color.h:
+        * platform/graphics/transforms/TransformationMatrix.h:
+        (WebCore::TransformationMatrix::rotate):
+        * platform/mac/WebVideoFullscreenInterfaceMac.h:
+        * platform/network/ParsedContentRange.h:
+        (WebCore::ParsedContentRange::ParsedContentRange):
+        (WebCore::ParsedContentRange::isValid):
+        * platform/network/ResourceResponseBase.h:
+        (WebCore::ResourceResponseBase::certificateInfo):
+        * platform/text/TextStream.h:
+        (WebCore::TextStream::increaseIndent):
+        (WebCore::TextStream::decreaseIndent):
+
 2016-09-21  Chris Dumez  <cdumez@apple.com>
 
         Object.getOwnPropertyDescriptor() does not work correctly cross origin
index 311e73a..d120eb7 100644 (file)
@@ -47,9 +47,12 @@ _VTPixelTransferSessionTransferImage
 _DDDFAScannerCreateFromCache
 _DDDFAScannerFirstResultInUnicharArray
 # Source/WebCore/page/mac/ServicesOverlayController.mm
+_DDHighlightGetLayerWithContext
+_DDHighlightGetBoundingRect
 _DDHighlightCreateWithRectsInVisibleRectWithStyleAndDirection
 _DDHighlightPointIsOnHighlight
 
+
 # Subclasses of an exported C++ class in JavaScriptCore.
 
 # Source/JavaScriptCore/inspector/ScriptDebugServer.h
index 1acbd5f..bc39523 100644 (file)
@@ -34,7 +34,7 @@ class Exception {
 public:
     explicit Exception(ExceptionCode);
 
-    WEBCORE_EXPORT ExceptionCode code() const;
+    ExceptionCode code() const;
 
 private:
     ExceptionCode m_code;
index abf8368..fbfdcb9 100644 (file)
@@ -135,7 +135,7 @@ namespace WebCore {
         void disconnectOwnerElement();
 
         MainFrame& mainFrame() const;
-        WEBCORE_EXPORT bool isMainFrame() const;
+        bool isMainFrame() const;
 
         Page* page() const;
         HTMLFrameOwnerElement* ownerElement() const;
index b8ce150..b9d23f7 100644 (file)
@@ -48,7 +48,7 @@ public:
     }
     WEBCORE_EXPORT virtual ~WebPlaybackSessionModelMediaElement();
     WEBCORE_EXPORT void setMediaElement(HTMLMediaElement*);
-    WEBCORE_EXPORT HTMLMediaElement* mediaElement() const { return m_mediaElement.get(); }
+    HTMLMediaElement* mediaElement() const { return m_mediaElement.get(); }
 
     WEBCORE_EXPORT void handleEvent(WebCore::ScriptExecutionContext*, WebCore::Event*) final;
     void updateForEventName(const WTF::AtomicString&);
index ffc8749..9d1179a 100644 (file)
@@ -54,7 +54,7 @@ public:
     }
     WEBCORE_EXPORT virtual ~WebVideoFullscreenModelVideoElement();
     WEBCORE_EXPORT void setVideoElement(HTMLVideoElement*);
-    WEBCORE_EXPORT HTMLVideoElement* videoElement() const { return m_videoElement.get(); }
+    HTMLVideoElement* videoElement() const { return m_videoElement.get(); }
     WEBCORE_EXPORT void setVideoFullscreenLayer(PlatformLayer*, std::function<void()> completionHandler = [] { });
     WEBCORE_EXPORT void waitForPreparedForInlineThen(std::function<void()> completionHandler = [] { });
     
index 3f3a7b3..652003a 100644 (file)
@@ -66,7 +66,7 @@ RGBA32 makePremultipliedRGBA(int r, int g, int b, int a);
 RGBA32 makeUnPremultipliedRGBA(int r, int g, int b, int a);
 
 WEBCORE_EXPORT RGBA32 colorWithOverrideAlpha(RGBA32 color, float overrideAlpha);
-WEBCORE_EXPORT RGBA32 colorWithOverrideAlpha(RGBA32 color, Optional<float> overrideAlpha);
+RGBA32 colorWithOverrideAlpha(RGBA32 color, Optional<float> overrideAlpha);
 
 WEBCORE_EXPORT RGBA32 makeRGBA32FromFloats(float r, float g, float b, float a);
 RGBA32 makeRGBAFromHSLA(double h, double s, double l, double a);
index 73ff363..06547d4 100644 (file)
@@ -231,7 +231,7 @@ public:
     TransformationMatrix& scale3d(double sx, double sy, double sz);
 
     // Angle is in degrees.
-    WEBCORE_EXPORT TransformationMatrix& rotate(double d) { return rotate3d(0, 0, d); }
+    TransformationMatrix& rotate(double d) { return rotate3d(0, 0, d); }
     TransformationMatrix& rotateFromVector(double x, double y);
     WEBCORE_EXPORT TransformationMatrix& rotate3d(double rx, double ry, double rz);
     
index db18c0d..f9f4a55 100644 (file)
@@ -78,7 +78,7 @@ public:
     WEBCORE_EXPORT void exitFullscreenWithoutAnimationToMode(HTMLMediaElementEnums::VideoFullscreenMode);
     WEBCORE_EXPORT void cleanupFullscreen();
     WEBCORE_EXPORT void invalidate();
-    WEBCORE_EXPORT void requestHideAndExitFullscreen() { }
+    void requestHideAndExitFullscreen() { }
     WEBCORE_EXPORT void preparedToReturnToInline(bool visible, const IntRect& inlineRect, NSWindow *parentWindow);
     WEBCORE_EXPORT void ensureControlsManager();
 
@@ -90,7 +90,7 @@ public:
 
     bool isPlayingVideoInEnhancedFullscreen() const;
 
-    WEBCORE_EXPORT bool mayAutomaticallyShowVideoPictureInPicture() const { return false; }
+    bool mayAutomaticallyShowVideoPictureInPicture() const { return false; }
     void applicationDidBecomeActive() { }
 
     WEBCORE_EXPORT WebVideoFullscreenInterfaceMacObjC *videoFullscreenInterfaceObjC();
index cfbf2da..281b803 100644 (file)
@@ -33,10 +33,10 @@ namespace WebCore {
 class ParsedContentRange {
 public:
     WEBCORE_EXPORT explicit ParsedContentRange(const String&);
-    WEBCORE_EXPORT ParsedContentRange() { }
+    ParsedContentRange() { }
     WEBCORE_EXPORT ParsedContentRange(int64_t firstBytePosition, int64_t lastBytePosition, int64_t instanceLength);
 
-    WEBCORE_EXPORT bool isValid() const { return m_isValid; }
+    bool isValid() const { return m_isValid; }
     int64_t firstBytePosition() const { return m_firstBytePosition; }
     int64_t lastBytePosition() const { return m_lastBytePosition; }
     int64_t instanceLength() const { return m_instanceLength; }
index ce1a5fb..7d68951 100644 (file)
@@ -115,7 +115,7 @@ public:
     WEBCORE_EXPORT String suggestedFilename() const;
 
     WEBCORE_EXPORT void includeCertificateInfo() const;
-    WEBCORE_EXPORT const Optional<CertificateInfo>& certificateInfo() const { return m_certificateInfo; };
+    const Optional<CertificateInfo>& certificateInfo() const { return m_certificateInfo; };
     
     // These functions return parsed values of the corresponding response headers.
     // NaN means that the header was not present or had invalid value.
index 87eecb3..f1e62d3 100644 (file)
@@ -77,8 +77,8 @@ public:
     WEBCORE_EXPORT void endGroup();
     WEBCORE_EXPORT void nextLine(); // Output newline and indent.
 
-    WEBCORE_EXPORT void increaseIndent() { ++m_indent; }
-    WEBCORE_EXPORT void decreaseIndent() { --m_indent; ASSERT(m_indent >= 0); }
+    void increaseIndent() { ++m_indent; }
+    void decreaseIndent() { --m_indent; ASSERT(m_indent >= 0); }
 
     WEBCORE_EXPORT void writeIndent();
 
index 7956862..840b673 100644 (file)
@@ -1,3 +1,20 @@
+2016-09-21  Keith Miller  <keith_miller@apple.com>
+
+        Fix build for future versions of Clang.
+        https://bugs.webkit.org/show_bug.cgi?id=162346
+
+        Reviewed by Filip Pizlo.
+
+        * TestWebKitAPI/Counters.cpp:
+        * TestWebKitAPI/Counters.h:
+        (DeleterCounter::deleterCount):
+        (DeleterCounter::TestingScope::TestingScope):
+        (DeleterCounter::operator()):
+        * TestWebKitAPI/Tests/WTF/HashCountedSet.cpp:
+        (TestWebKitAPI::TEST):
+        * TestWebKitAPI/Tests/WTF/HashMap.cpp:
+        (TestWebKitAPI::TEST):
+
 2016-09-21  Alex Christensen  <achristensen@webkit.org>
 
         Prepare API tests for enabling URLParser by default
index ada3de8..536a434 100644 (file)
@@ -33,4 +33,4 @@ unsigned CopyMoveCounter::moveCount = 0;
 unsigned ConstructorDestructorCounter::constructionCount = 0;
 unsigned ConstructorDestructorCounter::destructionCount = 0;
 
-template<> unsigned DeleterCounter<ConstructorDestructorCounter>::deleterCount = 0;
+template<> unsigned DeleterCounter<ConstructorDestructorCounter>::m_deleterCount = 0;
index 1335d2b..f9ea224 100644 (file)
@@ -65,22 +65,35 @@ struct ConstructorDestructorCounter {
     ~ConstructorDestructorCounter() { destructionCount++; }
 };
 
+#if COMPILER(CLANG)
+#if __has_warning("-Wundefined-var-template")
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wundefined-var-template"
+#endif
+#endif
 template<typename T>
 struct DeleterCounter {
-    static unsigned deleterCount;
+    static unsigned m_deleterCount;
+
+    static unsigned deleterCount() { return m_deleterCount; }
 
     struct TestingScope {
         TestingScope()
         {
-            deleterCount = 0;
+            m_deleterCount = 0;
         }
     };
 
     void operator()(T* p) const
     {
-        deleterCount++;
+        m_deleterCount++;
         delete p;
     }
 };
+#if COMPILER(CLANG)
+#if __has_warning("-Wundefined-var-template")
+#pragma clang diagnostic pop
+#endif
+#endif
 
 #endif // Counters_h
index 6a7bb19..9627bd0 100644 (file)
@@ -284,14 +284,14 @@ TEST(WTF_HashCountedSet, UniquePtrKey_CustomDeleter)
     EXPECT_EQ(1u, ConstructorDestructorCounter::constructionCount);
     EXPECT_EQ(0u, ConstructorDestructorCounter::destructionCount);
     
-    EXPECT_EQ(0u, DeleterCounter<ConstructorDestructorCounter>::deleterCount);
+    EXPECT_EQ(0u, DeleterCounter<ConstructorDestructorCounter>::deleterCount());
     
     hashCountedSet.clear();
     
     EXPECT_EQ(1u, ConstructorDestructorCounter::constructionCount);
     EXPECT_EQ(1u, ConstructorDestructorCounter::destructionCount);
     
-    EXPECT_EQ(1u, DeleterCounter<ConstructorDestructorCounter>::deleterCount);
+    EXPECT_EQ(1u, DeleterCounter<ConstructorDestructorCounter>::deleterCount());
 }
 
 TEST(WTF_HashCountedSet, UniquePtrKey_FindUsingRawPointer)
index a109d3f..b5bfc1a 100644 (file)
@@ -206,14 +206,14 @@ TEST(WTF_HashMap, UniquePtrKey_CustomDeleter)
     EXPECT_EQ(1u, ConstructorDestructorCounter::constructionCount);
     EXPECT_EQ(0u, ConstructorDestructorCounter::destructionCount);
 
-    EXPECT_EQ(0u, DeleterCounter<ConstructorDestructorCounter>::deleterCount);
+    EXPECT_EQ(0u, DeleterCounter<ConstructorDestructorCounter>::deleterCount());
 
     map.clear();
     
     EXPECT_EQ(1u, ConstructorDestructorCounter::constructionCount);
     EXPECT_EQ(1u, ConstructorDestructorCounter::destructionCount);
 
-    EXPECT_EQ(1u, DeleterCounter<ConstructorDestructorCounter>::deleterCount);
+    EXPECT_EQ(1u, DeleterCounter<ConstructorDestructorCounter>::deleterCount());
 }
 
 TEST(WTF_HashMap, UniquePtrKey_FindUsingRawPointer)