[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e

darin at apple.com darin at apple.com
Fri Jan 21 14:43:38 UTC 2011


The following commit has been merged in the debian/experimental branch:
commit 533ec97b8c439756c71114a79206e8adaab907c5
Author: darin at apple.com <darin at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Dec 27 21:41:39 2010 +0000

    2010-12-27  Jake Helfert  <jake at jakeonthenet.com>
    
            Reviewed and reworked by Darin Adler.
    
            Building WebKit with Visual Studio 2010 fails due
            to ambiguous assignment operator errors.
            https://bugs.webkit.org/show_bug.cgi?id=51116
    
            * wtf/NullPtr.h: Added a HAVE(NULLPTR) definition for use with
            Platform.h HAVE macro, and included the Visual Studio 2010 compiler
            as one of the ones that has nullptr.
            * wtf/NullPtr.cpp: Updated condition to match.
    
            * wtf/PassOwnArrayPtr.h: Don't include the operator=(nullptr_t)
            overload if we are compiling in loose mode and the compiler has
            nullptr, because assignment of 0 will otherwise encounter
            ambiguitity with this overload and the overload for loose mode
            that takes a raw pointer. The conditional can be removed when we
            get rid of loose mode.
            * wtf/PassOwnPtr.h: Ditto.
    
            * wtf/PassRefPtr.h: Don't include the operator=(nullptr_t) overload
            if the compiler has nullptr, because assignment of 0 would be
            ambiguous with the overload that takes a raw pointer. The conditional
            can be removed if we ever decide we no longer need to support
            assigning 0, but might need a way to catch that usage on older compilers.
            * wtf/RefPtr.h: Ditto.
            * wtf/RetainPtr.h: Ditto
    
            * JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.cpp,
            accidentally omitted when the file was first added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74695 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index e3ddeb1..94e522c 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,35 @@
+2010-12-27  Jake Helfert  <jake at jakeonthenet.com>
+
+        Reviewed and reworked by Darin Adler.
+
+        Building WebKit with Visual Studio 2010 fails due
+        to ambiguous assignment operator errors.
+        https://bugs.webkit.org/show_bug.cgi?id=51116
+
+        * wtf/NullPtr.h: Added a HAVE(NULLPTR) definition for use with
+        Platform.h HAVE macro, and included the Visual Studio 2010 compiler
+        as one of the ones that has nullptr.
+        * wtf/NullPtr.cpp: Updated condition to match.
+        
+        * wtf/PassOwnArrayPtr.h: Don't include the operator=(nullptr_t)
+        overload if we are compiling in loose mode and the compiler has
+        nullptr, because assignment of 0 will otherwise encounter
+        ambiguitity with this overload and the overload for loose mode
+        that takes a raw pointer. The conditional can be removed when we
+        get rid of loose mode.
+        * wtf/PassOwnPtr.h: Ditto.
+
+        * wtf/PassRefPtr.h: Don't include the operator=(nullptr_t) overload
+        if the compiler has nullptr, because assignment of 0 would be
+        ambiguous with the overload that takes a raw pointer. The conditional
+        can be removed if we ever decide we no longer need to support
+        assigning 0, but might need a way to catch that usage on older compilers.
+        * wtf/RefPtr.h: Ditto.
+        * wtf/RetainPtr.h: Ditto
+
+        * JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.cpp,
+        accidentally omitted when the file was first added.
+
 2010-12-26  Xan Lopez  <xlopez at igalia.com>
 
         Reviewed by Eric Seidel.
diff --git a/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj b/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
index 415d387..3111554 100644
--- a/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
+++ b/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
@@ -286,6 +286,7 @@
 		9330402C0E6A764000786E6A /* SmallStrings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93303FE80E6A72B500786E6A /* SmallStrings.cpp */; };
 		933F5CDC1269229B0049191E /* NullPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 933F5CDB126922690049191E /* NullPtr.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		937013480CA97E0E00FA14D3 /* pcre_ucp_searchfuncs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 937013470CA97E0E00FA14D3 /* pcre_ucp_searchfuncs.cpp */; settings = {COMPILER_FLAGS = "-Wno-sign-compare"; }; };
+		93854A9A12C93D3B00DAAF77 /* NullPtr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93854A9912C93D3B00DAAF77 /* NullPtr.cpp */; };
 		93E26BD408B1514100F85226 /* pcre_xclass.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E26BD308B1514100F85226 /* pcre_xclass.cpp */; };
 		9534AAFB0E5B7A9600B8A45B /* JSProfilerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 952C63AC0E4777D600C13936 /* JSProfilerPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		95742F650DD11F5A000917FB /* Profile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95742F630DD11F5A000917FB /* Profile.cpp */; };
@@ -913,6 +914,7 @@
 		9374D3A7038D9D74008635CE /* ScopeChain.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = ScopeChain.h; sourceTree = "<group>"; tabWidth = 8; };
 		9374D3A8038D9D74008635CE /* ScopeChain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScopeChain.cpp; sourceTree = "<group>"; tabWidth = 8; };
 		937B63CC09E766D200A671DD /* DerivedSources.make */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = DerivedSources.make; sourceTree = "<group>"; usesTabs = 1; };
+		93854A9912C93D3B00DAAF77 /* NullPtr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NullPtr.cpp; path = ./wtf/NullPtr.cpp; sourceTree = SOURCE_ROOT; };
 		938772E5038BFE19008635CE /* JSArray.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = JSArray.h; sourceTree = "<group>"; tabWidth = 8; };
 		938C4F690CA06BC700D9310A /* ASCIICType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASCIICType.h; sourceTree = "<group>"; };
 		938C4F6B0CA06BCE00D9310A /* DisallowCType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DisallowCType.h; sourceTree = "<group>"; };
@@ -1533,6 +1535,7 @@
 				9303F5690991190000AD71B8 /* Noncopyable.h */,
 				65E1A2F4122B880D00B26097 /* NonCopyingSort.h */,
 				C0A2723F0E509F1E00E96E15 /* NotFound.h */,
+				93854A9912C93D3B00DAAF77 /* NullPtr.cpp */,
 				933F5CDB126922690049191E /* NullPtr.h */,
 				1400067612A6F7830064D123 /* OSAllocator.h */,
 				1400069212A6F9E10064D123 /* OSAllocatorPosix.cpp */,
@@ -2833,6 +2836,7 @@
 				E1EF79AA0CE97BA60088D500 /* UTF8.cpp in Sources */,
 				868BFA17117CF19900B908B1 /* WTFString.cpp in Sources */,
 				86D08D5311793613006E5ED0 /* WTFThreadData.cpp in Sources */,
+				93854A9A12C93D3B00DAAF77 /* NullPtr.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/JavaScriptCore/wtf/NullPtr.cpp b/JavaScriptCore/wtf/NullPtr.cpp
index e7d94b2..c4228e3 100644
--- a/JavaScriptCore/wtf/NullPtr.cpp
+++ b/JavaScriptCore/wtf/NullPtr.cpp
@@ -26,7 +26,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include "NullPtr.h"
 
-#if !__has_feature(cxx_nullptr)
+#include "Platform.h"
+
+#if !HAVE(NULLPTR)
 
 std::nullptr_t nullptr;
 
diff --git a/JavaScriptCore/wtf/NullPtr.h b/JavaScriptCore/wtf/NullPtr.h
index 10a5814..08ece56 100644
--- a/JavaScriptCore/wtf/NullPtr.h
+++ b/JavaScriptCore/wtf/NullPtr.h
@@ -35,7 +35,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     #define __has_feature(feature) 0
 #endif
 
-#if !__has_feature(cxx_nullptr)
+#if __has_feature(cxx_nullptr) || (defined(_MSC_VER) && _MSC_VER >= 1600)
+
+#define HAVE_NULLPTR 1
+
+#else
 
 namespace std {
     class nullptr_t { };
diff --git a/JavaScriptCore/wtf/PassOwnArrayPtr.h b/JavaScriptCore/wtf/PassOwnArrayPtr.h
index 6a55491..499e850 100644
--- a/JavaScriptCore/wtf/PassOwnArrayPtr.h
+++ b/JavaScriptCore/wtf/PassOwnArrayPtr.h
@@ -73,7 +73,9 @@ public:
 #endif
 
     PassOwnArrayPtr& operator=(const PassOwnArrayPtr<T>&);
+#if !defined(LOOSE_PASS_OWN_ARRAY_PTR) || !HAVE(NULLPTR)
     PassOwnArrayPtr& operator=(std::nullptr_t) { clear(); return *this; }
+#endif
     template<typename U> PassOwnArrayPtr& operator=(const PassOwnArrayPtr<U>&);
 
     template<typename U> friend PassOwnArrayPtr<U> adoptArrayPtr(U*);
diff --git a/JavaScriptCore/wtf/PassOwnPtr.h b/JavaScriptCore/wtf/PassOwnPtr.h
index 60453fc..823f8b1 100644
--- a/JavaScriptCore/wtf/PassOwnPtr.h
+++ b/JavaScriptCore/wtf/PassOwnPtr.h
@@ -72,7 +72,9 @@ namespace WTF {
         operator UnspecifiedBoolType() const { return m_ptr ? &PassOwnPtr::m_ptr : 0; }
 
         PassOwnPtr& operator=(const PassOwnPtr<T>&);
+#if !defined(LOOSE_PASS_OWN_PTR) || !HAVE(NULLPTR)
         PassOwnPtr& operator=(std::nullptr_t) { clear(); return *this; }
+#endif
         template<typename U> PassOwnPtr& operator=(const PassOwnPtr<U>&);
 
         template<typename U> friend PassOwnPtr<U> adoptPtr(U*);
diff --git a/JavaScriptCore/wtf/PassRefPtr.h b/JavaScriptCore/wtf/PassRefPtr.h
index b179cef..7b4af6b 100644
--- a/JavaScriptCore/wtf/PassRefPtr.h
+++ b/JavaScriptCore/wtf/PassRefPtr.h
@@ -91,7 +91,9 @@ namespace WTF {
 
         PassRefPtr& operator=(T*);
         PassRefPtr& operator=(const PassRefPtr&);
+#if !HAVE(NULLPTR)
         PassRefPtr& operator=(std::nullptr_t) { clear(); return *this; }
+#endif
         template<typename U> PassRefPtr& operator=(const PassRefPtr<U>&);
         template<typename U> PassRefPtr& operator=(const RefPtr<U>&);
 
diff --git a/JavaScriptCore/wtf/RefPtr.h b/JavaScriptCore/wtf/RefPtr.h
index 6afa886..d57f88a 100644
--- a/JavaScriptCore/wtf/RefPtr.h
+++ b/JavaScriptCore/wtf/RefPtr.h
@@ -74,7 +74,9 @@ namespace WTF {
         RefPtr& operator=(T*);
         RefPtr& operator=(const PassRefPtr<T>&);
         RefPtr& operator=(const NonNullPassRefPtr<T>&);
+#if !HAVE(NULLPTR)
         RefPtr& operator=(std::nullptr_t) { clear(); return *this; }
+#endif
         template<typename U> RefPtr& operator=(const RefPtr<U>&);
         template<typename U> RefPtr& operator=(const PassRefPtr<U>&);
         template<typename U> RefPtr& operator=(const NonNullPassRefPtr<U>&);
diff --git a/JavaScriptCore/wtf/RetainPtr.h b/JavaScriptCore/wtf/RetainPtr.h
index 8a14cfe..fa7c163 100644
--- a/JavaScriptCore/wtf/RetainPtr.h
+++ b/JavaScriptCore/wtf/RetainPtr.h
@@ -87,7 +87,9 @@ namespace WTF {
         template<typename U> RetainPtr& operator=(const RetainPtr<U>&);
         RetainPtr& operator=(PtrType);
         template<typename U> RetainPtr& operator=(U*);
+#if !HAVE(NULLPTR)
         RetainPtr& operator=(std::nullptr_t) { clear(); return *this; }
+#endif
 
         void adoptCF(PtrType);
         void adoptNS(PtrType);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list