Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (156488 => 156489)
--- trunk/Source/_javascript_Core/ChangeLog 2013-09-26 19:37:48 UTC (rev 156488)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-09-26 19:48:46 UTC (rev 156489)
@@ -1,5 +1,19 @@
2013-09-26 Anders Carlsson <[email protected]>
+ Remove PassWeak.h
+ https://bugs.webkit.org/show_bug.cgi?id=121971
+
+ Reviewed by Geoffrey Garen.
+
+ * GNUmakefile.list.am:
+ * _javascript_Core.vcxproj/_javascript_Core.vcxproj:
+ * _javascript_Core.vcxproj/_javascript_Core.vcxproj.filters:
+ * _javascript_Core.xcodeproj/project.pbxproj:
+ * heap/PassWeak.h: Removed.
+ * heap/WeakInlines.h:
+
+2013-09-26 Anders Carlsson <[email protected]>
+
Stop using PassWeak
https://bugs.webkit.org/show_bug.cgi?id=121968
Modified: trunk/Source/_javascript_Core/GNUmakefile.list.am (156488 => 156489)
--- trunk/Source/_javascript_Core/GNUmakefile.list.am 2013-09-26 19:37:48 UTC (rev 156488)
+++ trunk/Source/_javascript_Core/GNUmakefile.list.am 2013-09-26 19:48:46 UTC (rev 156489)
@@ -519,7 +519,6 @@
Source/_javascript_Core/heap/TinyBloomFilter.h \
Source/_javascript_Core/heap/MarkedSpace.cpp \
Source/_javascript_Core/heap/MarkedSpace.h \
- Source/_javascript_Core/heap/PassWeak.h \
Source/_javascript_Core/heap/Region.h \
Source/_javascript_Core/heap/Strong.h \
Source/_javascript_Core/heap/StrongInlines.h \
Modified: trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj (156488 => 156489)
--- trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj 2013-09-26 19:37:48 UTC (rev 156488)
+++ trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj 2013-09-26 19:48:46 UTC (rev 156489)
@@ -725,7 +725,6 @@
<ClInclude Include="..\heap\MarkedSpace.h" />
<ClInclude Include="..\heap\MarkStack.h" />
<ClInclude Include="..\heap\MarkStackInlines.h" />
- <ClInclude Include="..\heap\PassWeak.h" />
<ClInclude Include="..\heap\Region.h" />
<ClInclude Include="..\heap\SlotVisitor.h" />
<ClInclude Include="..\heap\SlotVisitorInlines.h" />
Modified: trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj.filters (156488 => 156489)
--- trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj.filters 2013-09-26 19:37:48 UTC (rev 156488)
+++ trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj.filters 2013-09-26 19:48:46 UTC (rev 156489)
@@ -1278,9 +1278,6 @@
<ClInclude Include="..\heap\MarkStackInlines.h">
<Filter>heap</Filter>
</ClInclude>
- <ClInclude Include="..\heap\PassWeak.h">
- <Filter>heap</Filter>
- </ClInclude>
<ClInclude Include="..\heap\Region.h">
<Filter>heap</Filter>
</ClInclude>
Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (156488 => 156489)
--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2013-09-26 19:37:48 UTC (rev 156488)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2013-09-26 19:48:46 UTC (rev 156489)
@@ -618,7 +618,6 @@
148F21B7107EC5470042EC2C /* Nodes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F692A86D0255597D01FF60F7 /* Nodes.cpp */; };
148F21BC107EC54D0042EC2C /* Parser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93F0B3A909BB4DC00068FCE3 /* Parser.cpp */; };
149559EE0DDCDDF700648087 /* DebuggerCallFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 149559ED0DDCDDF700648087 /* DebuggerCallFrame.cpp */; };
- 1497209114EB831500FEB1B7 /* PassWeak.h in Headers */ = {isa = PBXBuildFile; fileRef = 1497209014EB831500FEB1B7 /* PassWeak.h */; settings = {ATTRIBUTES = (Private, ); }; };
14A1563210966365006FA260 /* DateInstanceCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 14A1563010966365006FA260 /* DateInstanceCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
14A23D750F4E1ABB0023CDAD /* JITStubs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14A23D6C0F4E19CE0023CDAD /* JITStubs.cpp */; };
14ABDF600A437FEF00ECCA01 /* JSCallbackObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14ABDF5E0A437FEF00ECCA01 /* JSCallbackObject.cpp */; };
@@ -1766,7 +1765,6 @@
14874AE215EBDE4A002E3587 /* JSScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSScope.h; sourceTree = "<group>"; };
148CD1D7108CF902008163C6 /* JSContextRefPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSContextRefPrivate.h; sourceTree = "<group>"; };
149559ED0DDCDDF700648087 /* DebuggerCallFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DebuggerCallFrame.cpp; sourceTree = "<group>"; };
- 1497209014EB831500FEB1B7 /* PassWeak.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PassWeak.h; sourceTree = "<group>"; };
149B24FF0D8AF6D1009CB8C7 /* Register.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Register.h; sourceTree = "<group>"; };
149DAAF212EB559D0083B12B /* ConservativeRoots.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConservativeRoots.h; sourceTree = "<group>"; };
14A1563010966365006FA260 /* DateInstanceCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DateInstanceCache.h; sourceTree = "<group>"; };
@@ -2836,7 +2834,6 @@
142D6F0E13539A4100B02E86 /* MarkStack.cpp */,
142D6F0F13539A4100B02E86 /* MarkStack.h */,
C21122E015DD9AB300790E3A /* MarkStackInlines.h */,
- 1497209014EB831500FEB1B7 /* PassWeak.h */,
C20B25981706536200C21F4E /* Region.h */,
C225494215F7DBAA0065E898 /* SlotVisitor.cpp */,
14BA78F013AAB88F005B7C2C /* SlotVisitor.h */,
@@ -4363,7 +4360,6 @@
0FCCAE4516D0CF7400D0C65B /* ParserError.h in Headers */,
A77F1825164192C700640A47 /* ParserModes.h in Headers */,
65303D641447B9E100D3F904 /* ParserTokens.h in Headers */,
- 1497209114EB831500FEB1B7 /* PassWeak.h in Headers */,
0F34B14C16D43E0D001CDA5A /* PolymorphicAccessStructureList.h in Headers */,
0F9FC8C414E1B60000D52AE0 /* PolymorphicPutByIdList.h in Headers */,
0F98206116BFE38300240D02 /* PreciseJumpTargets.h in Headers */,
Deleted: trunk/Source/_javascript_Core/heap/PassWeak.h (156488 => 156489)
--- trunk/Source/_javascript_Core/heap/PassWeak.h 2013-09-26 19:37:48 UTC (rev 156488)
+++ trunk/Source/_javascript_Core/heap/PassWeak.h 2013-09-26 19:48:46 UTC (rev 156489)
@@ -1,202 +0,0 @@
-/*
- * Copyright (C) 2012, 2013 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. ``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
- * 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.
- */
-
-#ifndef PassWeak_h
-#define PassWeak_h
-
-#include "JSCell.h"
-#include "WeakSetInlines.h"
-#include <cstddef>
-#include <wtf/Assertions.h>
-
-namespace JSC {
-
-template<typename T> class PassWeak;
-template<typename T> PassWeak<T> adoptWeak(WeakImpl*);
-
-template<typename T> class PassWeak {
-public:
- PassWeak();
- PassWeak(std::nullptr_t);
- PassWeak(T*, WeakHandleOwner* = 0, void* context = 0);
-
- // It somewhat breaks the type system to allow transfer of ownership out of
- // a const PassWeak. However, it makes it much easier to work with PassWeak
- // temporaries, and we don't have a need to use real const PassWeaks anyway.
- PassWeak(const PassWeak&);
- template<typename U> PassWeak(const PassWeak<U>&);
-
- ~PassWeak();
-
- T* operator->() const;
- T& operator*() const;
- T* get() const;
-
- bool operator!() const;
-
- // This conversion operator allows implicit conversion to bool but not to other integer types.
- typedef void* (PassWeak::*UnspecifiedBoolType);
- operator UnspecifiedBoolType*() const;
-
- WeakImpl* leakImpl() const WARN_UNUSED_RETURN;
-
-private:
- friend PassWeak adoptWeak<T>(WeakImpl*);
- explicit PassWeak(WeakImpl*);
-
- WeakImpl* m_impl;
-};
-
-template<typename T> inline PassWeak<T>::PassWeak()
- : m_impl(0)
-{
-}
-
-template<typename T> inline PassWeak<T>::PassWeak(std::nullptr_t)
- : m_impl(0)
-{
-}
-
-template<typename T> inline PassWeak<T>::PassWeak(T* cell, WeakHandleOwner* weakOwner, void* context)
- : m_impl(cell ? WeakSet::allocate(cell, weakOwner, context) : 0)
-{
-}
-
-template<typename T> inline PassWeak<T>::PassWeak(const PassWeak& o)
- : m_impl(o.leakImpl())
-{
-}
-
-template<typename T> template<typename U> inline PassWeak<T>::PassWeak(const PassWeak<U>& o)
- : m_impl(o.leakImpl())
-{
-}
-
-template<typename T> inline PassWeak<T>::~PassWeak()
-{
- if (!m_impl)
- return;
- WeakSet::deallocate(m_impl);
-}
-
-template<typename T> inline T* PassWeak<T>::operator->() const
-{
- ASSERT(m_impl && m_impl->state() == WeakImpl::Live);
- return jsCast<T*>(m_impl->jsValue().asCell());
-}
-
-template<typename T> inline T& PassWeak<T>::operator*() const
-{
- ASSERT(m_impl && m_impl->state() == WeakImpl::Live);
- return *jsCast<T*>(m_impl->jsValue().asCell());
-}
-
-template<typename T> inline T* PassWeak<T>::get() const
-{
- if (!m_impl || m_impl->state() != WeakImpl::Live)
- return 0;
- return jsCast<T*>(m_impl->jsValue().asCell());
-}
-
-template<typename T> inline bool PassWeak<T>::operator!() const
-{
- return !m_impl || m_impl->state() != WeakImpl::Live || !m_impl->jsValue();
-}
-
-template<typename T> inline PassWeak<T>::operator UnspecifiedBoolType*() const
-{
- return reinterpret_cast<UnspecifiedBoolType*>(!!*this);
-}
-
-template<typename T> inline PassWeak<T>::PassWeak(WeakImpl* impl)
-: m_impl(impl)
-{
-}
-
-template<typename T> inline WeakImpl* PassWeak<T>::leakImpl() const
-{
- WeakImpl* tmp = 0;
- std::swap(tmp, const_cast<WeakImpl*&>(m_impl));
- return tmp;
-}
-
-template<typename T> PassWeak<T> inline adoptWeak(WeakImpl* impl)
-{
- return PassWeak<T>(impl);
-}
-
-template<typename T, typename U> inline bool operator==(const PassWeak<T>& a, const PassWeak<U>& b)
-{
- return a.get() == b.get();
-}
-
-template<typename T, typename U> inline bool operator==(const PassWeak<T>& a, const Weak<U>& b)
-{
- return a.get() == b.get();
-}
-
-template<typename T, typename U> inline bool operator==(const Weak<T>& a, const PassWeak<U>& b)
-{
- return a.get() == b.get();
-}
-
-template<typename T, typename U> inline bool operator==(const PassWeak<T>& a, U* b)
-{
- return a.get() == b;
-}
-
-template<typename T, typename U> inline bool operator==(T* a, const PassWeak<U>& b)
-{
- return a == b.get();
-}
-
-template<typename T, typename U> inline bool operator!=(const PassWeak<T>& a, const PassWeak<U>& b)
-{
- return a.get() != b.get();
-}
-
-template<typename T, typename U> inline bool operator!=(const PassWeak<T>& a, const Weak<U>& b)
-{
- return a.get() != b.get();
-}
-
-template<typename T, typename U> inline bool operator!=(const Weak<T>& a, const PassWeak<U>& b)
-{
- return a.get() != b.get();
-}
-
-template<typename T, typename U> inline bool operator!=(const PassWeak<T>& a, U* b)
-{
- return a.get() != b;
-}
-
-template<typename T, typename U> inline bool operator!=(T* a, const PassWeak<U>& b)
-{
- return a != b.get();
-}
-
-} // namespace JSC
-
-#endif // PassWeak_h
Modified: trunk/Source/_javascript_Core/heap/WeakInlines.h (156488 => 156489)
--- trunk/Source/_javascript_Core/heap/WeakInlines.h 2013-09-26 19:37:48 UTC (rev 156488)
+++ trunk/Source/_javascript_Core/heap/WeakInlines.h 2013-09-26 19:48:46 UTC (rev 156489)
@@ -26,7 +26,7 @@
#ifndef WeakInlines_h
#define WeakInlines_h
-#include "PassWeak.h"
+#include "JSCell.h"
#include "WeakSetInlines.h"
#include <wtf/Assertions.h>
#include <wtf/HashTraits.h>
@@ -151,23 +151,16 @@
namespace WTF {
-template<typename T> struct VectorTraits<JSC::Weak<T> > : SimpleClassVectorTraits {
+template<typename T> struct VectorTraits<JSC::Weak<T>> : SimpleClassVectorTraits {
static const bool canCompareWithMemcmp = false;
};
-template<typename T> struct HashTraits<JSC::Weak<T> > : SimpleClassHashTraits<JSC::Weak<T> > {
+template<typename T> struct HashTraits<JSC::Weak<T>> : SimpleClassHashTraits<JSC::Weak<T>> {
typedef JSC::Weak<T> StorageType;
typedef std::nullptr_t EmptyValueType;
static EmptyValueType emptyValue() { return nullptr; }
- typedef JSC::PassWeak<T> PassInType;
- static void store(PassInType value, StorageType& storage) { storage = value; }
-
- typedef JSC::PassWeak<T> PassOutType;
- static PassOutType passOut(StorageType& value) { return value.release(); }
- static PassOutType passOut(EmptyValueType) { return PassOutType(); }
-
typedef T* PeekType;
static PeekType peek(const StorageType& value) { return value.get(); }
static PeekType peek(EmptyValueType) { return PeekType(); }
Modified: trunk/Source/WebCore/ChangeLog (156488 => 156489)
--- trunk/Source/WebCore/ChangeLog 2013-09-26 19:37:48 UTC (rev 156488)
+++ trunk/Source/WebCore/ChangeLog 2013-09-26 19:48:46 UTC (rev 156489)
@@ -1,3 +1,12 @@
+2013-09-26 Anders Carlsson <[email protected]>
+
+ Remove PassWeak.h
+ https://bugs.webkit.org/show_bug.cgi?id=121971
+
+ Reviewed by Geoffrey Garen.
+
+ * ForwardingHeaders/heap/PassWeak.h: Removed.
+
2013-09-26 Eric Carlson <[email protected]>
[MediaStream API] implement VideoStreamTrack and AudioStreamTrack
Deleted: trunk/Source/WebCore/ForwardingHeaders/heap/PassWeak.h (156488 => 156489)
--- trunk/Source/WebCore/ForwardingHeaders/heap/PassWeak.h 2013-09-26 19:37:48 UTC (rev 156488)
+++ trunk/Source/WebCore/ForwardingHeaders/heap/PassWeak.h 2013-09-26 19:48:46 UTC (rev 156489)
@@ -1,4 +0,0 @@
-#ifndef WebCore_FWD_PassWeak_h
-#define WebCore_FWD_PassWeak_h
-#include <_javascript_Core/PassWeak.h>
-#endif