Diff
Modified: trunk/Tools/ChangeLog (198084 => 198085)
--- trunk/Tools/ChangeLog 2016-03-13 22:03:44 UTC (rev 198084)
+++ trunk/Tools/ChangeLog 2016-03-13 22:28:11 UTC (rev 198085)
@@ -1,3 +1,32 @@
+2016-03-13 David Kilzer <[email protected]>
+
+ TestWebKitAPI: fix linker warnings
+ <http://webkit.org/b/155394>
+
+ Reviewed by Darin Adler.
+
+ * TestWebKitAPI/CMakeLists.txt:
+ - Add RefLogger.cpp source file.
+ - Add other missing cross-platform source files.
+ - Add FIXMEs about RunLoop.cpp and about missing
+ platform-specific source files.
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ - Add RefLogger.cpp source file.
+
+ * TestWebKitAPI/Counters.cpp:
+ (DeleterCounter<ConstructorDestructorCounter>::deleterCount):
+ Move specific declaration here to fix linker warning.
+ * TestWebKitAPI/Counters.h:
+ (DeleterCounter<T>::deleterCount): Remove declaration of global
+ template variable.
+
+ * TestWebKitAPI/Tests/WTF/RefLogger.cpp: Added.
+ (TestWebKitAPI::log): Added. Move inline definition in
+ RefLogger.h to here to fix linker warning.
+
+ * TestWebKitAPI/Tests/WTF/RefLogger.h:
+ (TestWebKitAPI::log): Replace inline function with declaration.
+
2016-03-12 David Kilzer <[email protected]>
REGRESSION (r178615): Fix incorrect case in included header for WeakPtr.cpp
Modified: trunk/Tools/TestWebKitAPI/CMakeLists.txt (198084 => 198085)
--- trunk/Tools/TestWebKitAPI/CMakeLists.txt 2016-03-13 22:03:44 UTC (rev 198084)
+++ trunk/Tools/TestWebKitAPI/CMakeLists.txt 2016-03-13 22:28:11 UTC (rev 198085)
@@ -41,9 +41,10 @@
${TESTWEBKITAPI_DIR}/Counters.cpp
${TESTWEBKITAPI_DIR}/TestsController.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/AtomicString.cpp
+ ${TESTWEBKITAPI_DIR}/Tests/WTF/BloomFilter.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/CString.cpp
+ ${TESTWEBKITAPI_DIR}/Tests/WTF/CheckedArithmeticOperations.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/Condition.cpp
- ${TESTWEBKITAPI_DIR}/Tests/WTF/CheckedArithmeticOperations.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/DateMath.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/Deque.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/Functional.cpp
@@ -62,6 +63,8 @@
${TESTWEBKITAPI_DIR}/Tests/WTF/ParkingLot.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/RedBlackTree.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/Ref.cpp
+ ${TESTWEBKITAPI_DIR}/Tests/WTF/RefCounter.cpp
+ ${TESTWEBKITAPI_DIR}/Tests/WTF/RefLogger.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/RefPtr.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/SHA1.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/SaturatedArithmeticOperations.cpp
@@ -73,9 +76,13 @@
${TESTWEBKITAPI_DIR}/Tests/WTF/TemporaryChange.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/Vector.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/WTFString.cpp
+ ${TESTWEBKITAPI_DIR}/Tests/WTF/WeakPtr.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/WorkQueue.cpp
)
+# FIXME: Tests/WTF/RunLoop.cpp is missing because it doesn't work for Windows.
+# FIXME: Platform-specific sources in Tests/WTF are not included in TestWTF_SOURCES.
+
WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
include_directories(
Modified: trunk/Tools/TestWebKitAPI/Counters.cpp (198084 => 198085)
--- trunk/Tools/TestWebKitAPI/Counters.cpp 2016-03-13 22:03:44 UTC (rev 198084)
+++ trunk/Tools/TestWebKitAPI/Counters.cpp 2016-03-13 22:28:11 UTC (rev 198085)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014, 2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -32,3 +32,5 @@
unsigned ConstructorDestructorCounter::constructionCount = 0;
unsigned ConstructorDestructorCounter::destructionCount = 0;
+
+template<> unsigned DeleterCounter<ConstructorDestructorCounter>::deleterCount = 0;
Modified: trunk/Tools/TestWebKitAPI/Counters.h (198084 => 198085)
--- trunk/Tools/TestWebKitAPI/Counters.h 2016-03-13 22:03:44 UTC (rev 198084)
+++ trunk/Tools/TestWebKitAPI/Counters.h 2016-03-13 22:28:11 UTC (rev 198085)
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2014 Igalia S.L.
- * Copyright (C) 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014, 2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -83,6 +83,4 @@
}
};
-template<class T> unsigned DeleterCounter<T>::deleterCount = 0;
-
#endif // Counters_h
Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (198084 => 198085)
--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2016-03-13 22:03:44 UTC (rev 198084)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2016-03-13 22:28:11 UTC (rev 198085)
@@ -63,6 +63,7 @@
37E1064C1697681800B78BD0 /* DOMHTMLTableCellElementCellAbove.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 37E1064B169767F700B78BD0 /* DOMHTMLTableCellElementCellAbove.html */; };
41973B5B1AF2286A006C7B36 /* FileSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41973B5A1AF2286A006C7B36 /* FileSystem.cpp */; };
41973B5D1AF22875006C7B36 /* SharedBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41973B5C1AF22875006C7B36 /* SharedBuffer.cpp */; };
+ 442BBF6A1C91CB1B0017087F /* RefLogger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 442BBF681C91CAD90017087F /* RefLogger.cpp */; };
4BFDFFA71314776C0061F24B /* HitTestResultNodeHandle_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFDFFA61314776C0061F24B /* HitTestResultNodeHandle_Bundle.cpp */; };
51393E221523952D005F39C5 /* DOMWindowExtensionBasic_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51393E1D1523944A005F39C5 /* DOMWindowExtensionBasic_Bundle.cpp */; };
5142B2731517C8C800C32B19 /* ContextMenuCanCopyURL.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 5142B2721517C89100C32B19 /* ContextMenuCanCopyURL.html */; };
@@ -602,6 +603,7 @@
41973B5A1AF2286A006C7B36 /* FileSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileSystem.cpp; sourceTree = "<group>"; };
41973B5C1AF22875006C7B36 /* SharedBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SharedBuffer.cpp; sourceTree = "<group>"; };
440A1D3814A0103A008A66F2 /* URL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = URL.cpp; sourceTree = "<group>"; };
+ 442BBF681C91CAD90017087F /* RefLogger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RefLogger.cpp; sourceTree = "<group>"; };
44A622C114A0E2B60048515B /* WTFStringUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WTFStringUtilities.h; sourceTree = "<group>"; };
4A410F4B19AF7BD6002EBAB5 /* UserMedia.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserMedia.cpp; sourceTree = "<group>"; };
4A410F4D19AF7BEF002EBAB5 /* getUserMedia.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = getUserMedia.html; sourceTree = "<group>"; };
@@ -1314,6 +1316,7 @@
0FC6C4CB141027E0005B7F0C /* RedBlackTree.cpp */,
93A427AA180DA26400CD24D7 /* Ref.cpp */,
86BD19971A2DB05B006DCF0A /* RefCounter.cpp */,
+ 442BBF681C91CAD90017087F /* RefLogger.cpp */,
93A427AD180DA60F00CD24D7 /* RefLogger.h */,
93A427A8180D9B0700CD24D7 /* RefPtr.cpp */,
E4C9ABC71B3DB1710040A987 /* RunLoop.cpp */,
@@ -1779,6 +1782,7 @@
7CCE7F361A411B8E00447C4C /* HashSet.cpp in Sources */,
7CCE7EFA1A411AE600447C4C /* HitTestResultNodeHandle.cpp in Sources */,
7CCE7EC11A411A7E00447C4C /* HTMLCollectionNamedItem.mm in Sources */,
+ 442BBF6A1C91CB1B0017087F /* RefLogger.cpp in Sources */,
7CCE7EC21A411A7E00447C4C /* HTMLFormCollectionNamedItem.mm in Sources */,
7CCE7EFB1A411AE600447C4C /* InjectedBundleBasic.cpp in Sources */,
7CCE7EFC1A411AE600447C4C /* InjectedBundleFrameHitTest.cpp in Sources */,
Copied: trunk/Tools/TestWebKitAPI/Tests/WTF/RefLogger.cpp (from rev 198084, trunk/Tools/TestWebKitAPI/Counters.cpp) (0 => 198085)
--- trunk/Tools/TestWebKitAPI/Tests/WTF/RefLogger.cpp (rev 0)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/RefLogger.cpp 2016-03-13 22:28:11 UTC (rev 198085)
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2013, 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include "RefLogger.h"
+
+namespace TestWebKitAPI {
+
+std::ostringstream& log()
+{
+ static std::ostringstream log;
+ return log;
+}
+
+}
Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/RefLogger.h (198084 => 198085)
--- trunk/Tools/TestWebKitAPI/Tests/WTF/RefLogger.h 2016-03-13 22:03:44 UTC (rev 198084)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/RefLogger.h 2016-03-13 22:28:11 UTC (rev 198085)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2013, 2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -27,11 +27,7 @@
namespace TestWebKitAPI {
-inline std::ostringstream& log()
-{
- static std::ostringstream log;
- return log;
-}
+std::ostringstream& log();
inline std::string takeLogStr()
{