Changeset 69970 in webkit
- Timestamp:
- Oct 18, 2010 10:23:53 AM (14 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 1 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r69965 r69970 1 2010-10-18 Darin Adler <darin@apple.com> 2 3 Reviewed by Anders Carlsson. 4 5 Make a nullptr that works with OwnPtr and RefPtr 6 https://bugs.webkit.org/show_bug.cgi?id=47756 7 8 * JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.h. 9 10 * wtf/NullPtr.h: Added. 11 12 * wtf/OwnArrayPtr.h: Add an overload of = taking nullptr. 13 * wtf/OwnPtr.h: Ditto. 14 * wtf/PassOwnArrayPtr.h: Ditto. 15 * wtf/PassOwnPtr.h: Ditto. 16 * wtf/PassRefPtr.h: Ditto. 17 * wtf/RefPtr.h: Ditto. 18 * wtf/RetainPtr.h: Ditto. 19 1 20 2010-10-18 Oliver Hunt <oliver@apple.com> 2 21 -
trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r69928 r69970 278 278 933040040E6A749400786E6A /* SmallStrings.h in Headers */ = {isa = PBXBuildFile; fileRef = 93303FEA0E6A72C000786E6A /* SmallStrings.h */; settings = {ATTRIBUTES = (Private, ); }; }; 279 279 9330402C0E6A764000786E6A /* SmallStrings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93303FE80E6A72B500786E6A /* SmallStrings.cpp */; }; 280 933F5CDC1269229B0049191E /* NullPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 933F5CDB126922690049191E /* NullPtr.h */; settings = {ATTRIBUTES = (Private, ); }; }; 280 281 937013480CA97E0E00FA14D3 /* pcre_ucp_searchfuncs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 937013470CA97E0E00FA14D3 /* pcre_ucp_searchfuncs.cpp */; settings = {COMPILER_FLAGS = "-Wno-sign-compare"; }; }; 281 282 93E26BD408B1514100F85226 /* pcre_xclass.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E26BD308B1514100F85226 /* pcre_xclass.cpp */; }; … … 892 893 933A349A038AE7C6008635CE /* Identifier.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = Identifier.h; sourceTree = "<group>"; tabWidth = 8; }; 893 894 933A349D038AE80F008635CE /* Identifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Identifier.cpp; sourceTree = "<group>"; tabWidth = 8; }; 895 933F5CDB126922690049191E /* NullPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NullPtr.h; sourceTree = "<group>"; }; 894 896 935AF46909E9D9DB00ACD1D8 /* Forward.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Forward.h; sourceTree = "<group>"; }; 895 897 935AF46B09E9D9DB00ACD1D8 /* UnusedParam.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnusedParam.h; sourceTree = "<group>"; }; … … 1518 1520 9303F5690991190000AD71B8 /* Noncopyable.h */, 1519 1521 C0A2723F0E509F1E00E96E15 /* NotFound.h */, 1522 933F5CDB126922690049191E /* NullPtr.h */, 1520 1523 9303F5A409911A5800AD71B8 /* OwnArrayPtr.h */, 1521 1524 BCFBE697122561D200309E9D /* OwnArrayPtrCommon.h */, … … 2343 2346 90213E3E123A40C200D422F3 /* MemoryStatistics.h in Headers */, 2344 2347 A730B6121250068F009D25B1 /* StrictEvalActivation.h in Headers */, 2348 933F5CDC1269229B0049191E /* NullPtr.h in Headers */, 2345 2349 ); 2346 2350 runOnlyForDeploymentPostprocessing = 0; -
trunk/JavaScriptCore/wtf/Noncopyable.h
r68419 r69970 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or -
trunk/JavaScriptCore/wtf/OwnArrayPtr.h
r66139 r69970 24 24 #include "Assertions.h" 25 25 #include "Noncopyable.h" 26 #include "NullPtr.h" 26 27 #include "OwnArrayPtrCommon.h" 27 28 #include <algorithm> … … 74 75 75 76 OwnArrayPtr& operator=(const PassOwnArrayPtr<T>&); 77 OwnArrayPtr& operator=(std::nullptr_t) { clear(); return *this; } 76 78 template<typename U> OwnArrayPtr& operator=(const PassOwnArrayPtr<U>&); 77 79 -
trunk/JavaScriptCore/wtf/OwnPtr.h
r63093 r69970 24 24 #include "Assertions.h" 25 25 #include "Noncopyable.h" 26 #include "NullPtr.h" 26 27 #include "OwnPtrCommon.h" 27 28 #include "TypeTraits.h" … … 73 74 74 75 OwnPtr& operator=(const PassOwnPtr<T>&); 76 OwnPtr& operator=(std::nullptr_t) { clear(); return *this; } 75 77 template<typename U> OwnPtr& operator=(const PassOwnPtr<U>&); 76 78 -
trunk/JavaScriptCore/wtf/PassOwnArrayPtr.h
r66139 r69970 28 28 29 29 #include "Assertions.h" 30 #include "NullPtr.h" 30 31 #include "OwnArrayPtrCommon.h" 31 32 #include "TypeTraits.h" … … 73 74 74 75 PassOwnArrayPtr& operator=(const PassOwnArrayPtr<T>&); 76 PassOwnArrayPtr& operator=(std::nullptr_t) { clear(); return *this; } 75 77 template<typename U> PassOwnArrayPtr& operator=(const PassOwnArrayPtr<U>&); 76 78 -
trunk/JavaScriptCore/wtf/PassOwnPtr.h
r63093 r69970 28 28 29 29 #include "Assertions.h" 30 #include "NullPtr.h" 30 31 #include "OwnPtrCommon.h" 31 32 #include "TypeTraits.h" … … 72 73 73 74 PassOwnPtr& operator=(const PassOwnPtr<T>&); 75 PassOwnPtr& operator=(std::nullptr_t) { clear(); return *this; } 74 76 template<typename U> PassOwnPtr& operator=(const PassOwnPtr<U>&); 75 77 -
trunk/JavaScriptCore/wtf/PassRefPtr.h
r67972 r69970 23 23 24 24 #include "AlwaysInline.h" 25 #include "NullPtr.h" 25 26 26 27 namespace WTF { … … 91 92 PassRefPtr& operator=(T*); 92 93 PassRefPtr& operator=(const PassRefPtr&); 94 PassRefPtr& operator=(std::nullptr_t) { clear(); return *this; } 93 95 template<typename U> PassRefPtr& operator=(const PassRefPtr<U>&); 94 96 template<typename U> PassRefPtr& operator=(const RefPtr<U>&); -
trunk/JavaScriptCore/wtf/RefPtr.h
r65130 r69970 25 25 26 26 #include <algorithm> 27 #include "AlwaysInline.h"28 27 #include "FastAllocBase.h" 29 28 #include "PassRefPtr.h" … … 76 75 RefPtr& operator=(const PassRefPtr<T>&); 77 76 RefPtr& operator=(const NonNullPassRefPtr<T>&); 77 RefPtr& operator=(std::nullptr_t) { clear(); return *this; } 78 78 template<typename U> RefPtr& operator=(const RefPtr<U>&); 79 79 template<typename U> RefPtr& operator=(const PassRefPtr<U>&); -
trunk/JavaScriptCore/wtf/RetainPtr.h
r65130 r69970 23 23 24 24 #include "HashTraits.h" 25 #include "NullPtr.h" 25 26 #include "TypeTraits.h" 26 27 #include <algorithm> … … 87 88 RetainPtr& operator=(PtrType); 88 89 template<typename U> RetainPtr& operator=(U*); 90 RetainPtr& operator=(std::nullptr_t) { clear(); return *this; } 89 91 90 92 void adoptCF(PtrType);
Note: See TracChangeset
for help on using the changeset viewer.