⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 245972 in webkit


Ignore:
Timestamp:
May 31, 2019, 10:11:58 AM (7 years ago)
Author:
ggaren@apple.com
Message:

Some WeakPtr cleanup
https://bugs.webkit.org/show_bug.cgi?id=198390

Reviewed by Chris Dumez.

Source/WebCore:

  • Modules/indexeddb/shared/InProcessIDBServer.cpp:

(WebCore::storageQuotaManagerGetter): Dereference the weak pointer
directly instead of using a weak pointer to guard a raw pointer. It's
safer and more idiomatic to use weak pointers directly.

  • Modules/indexeddb/shared/InProcessIDBServer.h: Use our base clase

weakPtrFactory() definition instead of writing our own. Declare
WeakValueType so we can dereference the weak pointer we create (above).

Source/WTF:

  • wtf/WeakHashSet.h:

(WTF::HashTraits<Ref<WeakPtrImpl>>::isReleasedWeakValue):
(WTF::WeakHashSet::WeakHashSetConstIterator::WeakHashSetConstIterator):
Updated for rename to WeakPtrImpl.

(WTF::WeakHashSet::WeakHashSetConstIterator::get const): Updated for new
get() interface. Also, switched to iterator operator* to help clarify
the double dereference here.

(WTF::WeakHashSet::add):
(WTF::WeakHashSet::remove):
(WTF::WeakHashSet::contains const):
(WTF::WeakHashSet::computeSize const):
(WTF::HashTraits<Ref<WeakReference>>::isReleasedWeakValue): Deleted.
Updated for rename to WeakPtrImpl.

  • wtf/WeakPtr.h:

(WTF::WeakPtrImpl::create):
(WTF::WeakPtrImpl::~WeakPtrImpl): Renamed WeakReference to WeakPtrImpl.
Now we don't need a comment explaining that this class is the backing
implementation of WeakPtr.

(WTF::WeakPtrImpl::get): Return the pointer type we stored, rather than
the pointer type requested by our client. It's a little too surprising
for a field to store one pointer type and load another.

(WTF::WeakPtrImpl::WeakPtrImpl): Fixed a theoretical type safety bug.
Make sure to store T::WeakValueType* instead of T*, since they might
not be the same pointer value. (In practice, T and T::WeakValueType*
are always the same type in this constructor because WeakPtrFactory
makes them so, but it's best not to depend on implementation details
across classes.)

(WTF::WeakPtr::get const): Updated for new get() interface.

(WTF::WeakPtr::operator bool const):
(WTF::WeakPtr::operator=):
(WTF::WeakPtr::clear):
(WTF::WeakPtr::WeakPtr): Updated for WeakPtrImpl rename.

(WTF::WeakPtrFactory::~WeakPtrFactory): Updated for WeakPtrImpl rename.

(WTF::WeakPtrFactory::createWeakPtr const): ASSERT that the passed-in
pointer is equal to the stored pointer. As a space optimization, we
require our client to remind us what we point to each time a weak
pointer is created -- but nothing guarantees that our client will do
this correctly.

(WTF::WeakPtrFactory::revokeAll): Updated for WeakPtrImpl rename.

(WTF::CanMakeWeakPtr::weakPtrFactory const):
(WTF::CanMakeWeakPtr::weakPtrFactory): Use idiomatic accessor naming.

(WTF::weak_ptr_impl_cast): Fixed a theoretical type safety bug.
Previously, if Base and Derived both inherited CanMakeWeakPtr, and
you casted WeakPtr<Base> to WeakPtr<Derived> (or vice versa), and
casting Base <-> Derived required pointer fixup, the previous
compile-time check would accept the cast, even though the stored pointer
would be wrong.

(WTF::WeakPtr<T>::WeakPtr):
(WTF::=):
(WTF::makeWeakPtr):
(WTF::WeakReference::create): Deleted.
(WTF::WeakReference::~WeakReference): Deleted.
(WTF::WeakReference::get const): Deleted.
(WTF::WeakReference::operator bool const): Deleted.
(WTF::WeakReference::clear): Deleted.
(WTF::WeakReference::WeakReference): Deleted.
(WTF::weak_reference_cast): Deleted. Updated for rename to WeakPtrImpl.

Don't export WeakPtrImpl because it's an implmenetation detail and
it shouldn't be easy to use outside WTF.

Tools:

  • TestWebKitAPI/Tests/WTF/WeakPtr.cpp: Updated for rename.
Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r245968 r245972  
     12019-05-31  Geoffrey Garen  <ggaren@apple.com>
     2
     3        Some WeakPtr cleanup
     4        https://bugs.webkit.org/show_bug.cgi?id=198390
     5
     6        Reviewed by Chris Dumez.
     7
     8        * wtf/WeakHashSet.h:
     9        (WTF::HashTraits<Ref<WeakPtrImpl>>::isReleasedWeakValue):
     10        (WTF::WeakHashSet::WeakHashSetConstIterator::WeakHashSetConstIterator):
     11        Updated for rename to WeakPtrImpl.
     12
     13        (WTF::WeakHashSet::WeakHashSetConstIterator::get const): Updated for new
     14        get() interface. Also, switched to iterator operator* to help clarify
     15        the double dereference here.
     16
     17        (WTF::WeakHashSet::add):
     18        (WTF::WeakHashSet::remove):
     19        (WTF::WeakHashSet::contains const):
     20        (WTF::WeakHashSet::computeSize const):
     21        (WTF::HashTraits<Ref<WeakReference>>::isReleasedWeakValue): Deleted.
     22        Updated for rename to WeakPtrImpl.
     23
     24        * wtf/WeakPtr.h:
     25        (WTF::WeakPtrImpl::create):
     26        (WTF::WeakPtrImpl::~WeakPtrImpl): Renamed WeakReference to WeakPtrImpl.
     27        Now we don't need a comment explaining that this class is the backing
     28        implementation of WeakPtr.
     29
     30        (WTF::WeakPtrImpl::get): Return the pointer type we stored, rather than
     31        the pointer type requested by our client. It's a little too surprising
     32        for a field to store one pointer type and load another.
     33
     34        (WTF::WeakPtrImpl::WeakPtrImpl): Fixed a theoretical type safety bug.
     35        Make sure to store T::WeakValueType* instead of T*, since they might
     36        not be the same pointer value. (In practice, T and T::WeakValueType*
     37        are always the same type in this constructor because WeakPtrFactory
     38        makes them so, but it's best not to depend on implementation details
     39        across classes.)
     40
     41        (WTF::WeakPtr::get const): Updated for new get() interface.
     42
     43        (WTF::WeakPtr::operator bool const):
     44        (WTF::WeakPtr::operator=):
     45        (WTF::WeakPtr::clear):
     46        (WTF::WeakPtr::WeakPtr): Updated for WeakPtrImpl rename.
     47
     48        (WTF::WeakPtrFactory::~WeakPtrFactory): Updated for WeakPtrImpl rename.
     49
     50        (WTF::WeakPtrFactory::createWeakPtr const): ASSERT that the passed-in
     51        pointer is equal to the stored pointer. As a space optimization, we
     52        require our client to remind us what we point to each time a weak
     53        pointer is created -- but nothing guarantees that our client will do
     54        this correctly.
     55
     56        (WTF::WeakPtrFactory::revokeAll): Updated for WeakPtrImpl rename.
     57
     58        (WTF::CanMakeWeakPtr::weakPtrFactory const):
     59        (WTF::CanMakeWeakPtr::weakPtrFactory): Use idiomatic accessor naming.
     60
     61        (WTF::weak_ptr_impl_cast): Fixed a theoretical type safety bug.
     62        Previously, if Base and Derived both inherited CanMakeWeakPtr, and
     63        you casted WeakPtr<Base> to WeakPtr<Derived> (or vice versa), and
     64        casting Base <-> Derived required pointer fixup, the previous
     65        compile-time check would accept the cast, even though the stored pointer
     66        would be wrong.
     67
     68        (WTF::WeakPtr<T>::WeakPtr):
     69        (WTF::=):
     70        (WTF::makeWeakPtr):
     71        (WTF::WeakReference::create): Deleted.
     72        (WTF::WeakReference::~WeakReference): Deleted.
     73        (WTF::WeakReference::get const): Deleted.
     74        (WTF::WeakReference::operator bool const): Deleted.
     75        (WTF::WeakReference::clear): Deleted.
     76        (WTF::WeakReference::WeakReference): Deleted.
     77        (WTF::weak_reference_cast): Deleted. Updated for rename to WeakPtrImpl.
     78
     79        Don't export WeakPtrImpl because it's an implmenetation detail and
     80        it shouldn't be easy to use outside WTF.
     81
    1822019-05-31  Don Olmstead  <don.olmstead@sony.com>
    283
  • trunk/Source/WTF/wtf/WeakHashSet.h

    r245868 r245972  
    3333namespace WTF {
    3434
    35 template<> struct HashTraits<Ref<WeakReference>> : RefHashTraits<WeakReference> {
     35template<> struct HashTraits<Ref<WeakPtrImpl>> : RefHashTraits<WeakPtrImpl> {
    3636    static const bool hasIsReleasedWeakValueFunction = true;
    37     static bool isReleasedWeakValue(const Ref<WeakReference>& value)
     37    static bool isReleasedWeakValue(const Ref<WeakPtrImpl>& value)
    3838    {
    3939        return !value.isHashTableDeletedValue() && !value.isHashTableEmptyValue() && !value.get();
     
    4444class WeakHashSet {
    4545public:
    46     typedef HashSet<Ref<WeakReference>> WeakReferenceSet;
     46    typedef HashSet<Ref<WeakPtrImpl>> WeakPtrImplSet;
    4747
    4848    class WeakHashSetConstIterator : public std::iterator<std::forward_iterator_tag, T, std::ptrdiff_t, const T*, const T&> {
    4949    private:
    50         WeakHashSetConstIterator(const WeakReferenceSet& set, typename WeakReferenceSet::const_iterator position)
     50        WeakHashSetConstIterator(const WeakPtrImplSet& set, typename WeakPtrImplSet::const_iterator position)
    5151            : m_position(position), m_endPosition(set.end())
    5252        {
     
    5555
    5656    public:
    57         T* get() const { return m_position->get().template get<T, typename T::WeakValueType>(); }
     57        T* get() const { return static_cast<T*>((*m_position)->template get<T>()); }
    5858        T& operator*() const { return *get(); }
    5959        T* operator->() const { return get(); }
     
    8686        template <typename> friend class WeakHashSet;
    8787
    88         typename WeakReferenceSet::const_iterator m_position;
    89         typename WeakReferenceSet::const_iterator m_endPosition;
     88        typename WeakPtrImplSet::const_iterator m_position;
     89        typename WeakPtrImplSet::const_iterator m_endPosition;
    9090    };
    9191    typedef WeakHashSetConstIterator const_iterator;
     
    9999    void add(const U& value)
    100100    {
    101         m_set.add(*makeWeakPtr<T>(const_cast<U&>(value)).m_ref);
     101        m_set.add(*makeWeakPtr<T>(const_cast<U&>(value)).m_impl);
    102102    }
    103103
     
    105105    bool remove(const U& value)
    106106    {
    107         auto& weakReference = value.weakPtrFactory().m_ref;
    108         if (!weakReference || !*weakReference)
     107        auto& weakPtrImpl = value.weakPtrFactory().m_impl;
     108        if (!weakPtrImpl || !*weakPtrImpl)
    109109            return false;
    110         return m_set.remove(*weakReference);
     110        return m_set.remove(*weakPtrImpl);
    111111    }
    112112
     
    114114    bool contains(const U& value) const
    115115    {
    116         auto& weakReference = value.weakPtrFactory().m_ref;
    117         if (!weakReference || !*weakReference)
     116        auto& weakPtrImpl = value.weakPtrFactory().m_impl;
     117        if (!weakPtrImpl || !*weakPtrImpl)
    118118            return false;
    119         return m_set.contains(*weakReference);
     119        return m_set.contains(*weakPtrImpl);
    120120    }
    121121
     
    131131    unsigned computeSize() const
    132132    {
    133         const_cast<WeakReferenceSet&>(m_set).removeIf([] (auto& value) { return !value.get(); });
     133        const_cast<WeakPtrImplSet&>(m_set).removeIf([] (auto& value) { return !value.get(); });
    134134        return m_set.size();
    135135    }
     
    142142
    143143private:
    144     WeakReferenceSet m_set;
     144    WeakPtrImplSet m_set;
    145145};
    146146
  • trunk/Source/WTF/wtf/WeakPtr.h

    r245868 r245972  
    3535
    3636// Testing interface for TestWebKitAPI
    37 #ifndef DID_CREATE_WEAK_REFERENCE
    38 #define DID_CREATE_WEAK_REFERENCE(p)
     37#ifndef DID_CREATE_WEAK_PTR_IMPL
     38#define DID_CREATE_WEAK_PTR_IMPL(p)
    3939#endif
    40 #ifndef WILL_DESTROY_WEAK_REFERENCE
    41 #define WILL_DESTROY_WEAK_REFERENCE(p)
     40#ifndef WILL_DESTROY_WEAK_PTR_IMPL
     41#define WILL_DESTROY_WEAK_PTR_IMPL(p)
    4242#endif
    4343
     
    4646template<typename> class WeakPtrFactory;
    4747
    48 // Note: WeakReference is an implementation detail, and should not be used directly.
    49 class WeakReference : public ThreadSafeRefCounted<WeakReference> {
    50     WTF_MAKE_NONCOPYABLE(WeakReference);
     48class WeakPtrImpl : public ThreadSafeRefCounted<WeakPtrImpl> {
     49    WTF_MAKE_NONCOPYABLE(WeakPtrImpl);
    5150    WTF_MAKE_FAST_ALLOCATED;
    5251public:
    53     template<typename T> static Ref<WeakReference> create(T* ptr) { return adoptRef(*new WeakReference(ptr)); }
    54 
    55     ~WeakReference()
    56     {
    57         WILL_DESTROY_WEAK_REFERENCE(m_ptr);
    58     }
    59 
    60     template<typename T, typename WeakValueType> T* get() const { return static_cast<T*>(static_cast<WeakValueType*>(m_ptr)); }
     52    template<typename T> static Ref<WeakPtrImpl> create(T* ptr)
     53    {
     54        return adoptRef(*new WeakPtrImpl(ptr));
     55    }
     56
     57    ~WeakPtrImpl()
     58    {
     59        WILL_DESTROY_WEAK_PTR_IMPL(m_ptr);
     60    }
     61
     62    template<typename T> typename T::WeakValueType* get()
     63    {
     64        return static_cast<typename T::WeakValueType*>(m_ptr);
     65    }
     66
    6167    explicit operator bool() const { return m_ptr; }
    62 
    6368    void clear() { m_ptr = nullptr; }
    6469
    6570private:
    66     template<typename T> explicit WeakReference(T* ptr)
    67         : m_ptr(ptr)
    68     {
    69         DID_CREATE_WEAK_REFERENCE(ptr);
     71    template<typename T> explicit WeakPtrImpl(T* ptr)
     72        : m_ptr(static_cast<typename T::WeakValueType*>(ptr))
     73    {
     74        DID_CREATE_WEAK_PTR_IMPL(ptr);
    7075    }
    7176
     
    8287    template<typename U> WeakPtr(WeakPtr<U>&&);
    8388
    84     T* get() const { return m_ref ? m_ref->template get<T, typename T::WeakValueType>() : nullptr; }
    85     explicit operator bool() const { return m_ref && *m_ref; }
    86 
    87     WeakPtr& operator=(std::nullptr_t) { m_ref = nullptr; return *this; }
     89    T* get() const { return m_impl ? static_cast<T*>(m_impl->get<T>()) : nullptr; }
     90    explicit operator bool() const { return m_impl && *m_impl; }
     91
     92    WeakPtr& operator=(std::nullptr_t) { m_impl = nullptr; return *this; }
    8893    template<typename U> WeakPtr& operator=(const WeakPtr<U>&);
    8994    template<typename U> WeakPtr& operator=(WeakPtr<U>&&);
     
    9297    T& operator*() const { return *get(); }
    9398
    94     void clear() { m_ref = nullptr; }
    95 
    96 private:
    97     explicit WeakPtr(Ref<WeakReference>&& ref) : m_ref(std::move(ref)) { }
     99    void clear() { m_impl = nullptr; }
     100
     101private:
     102    explicit WeakPtr(Ref<WeakPtrImpl>&& ref) : m_impl(WTFMove(ref)) { }
    98103    template<typename> friend class WeakHashSet;
    99104    template<typename> friend class WeakPtr;
     
    101106    template<typename U> friend WeakPtr<U> makeWeakPtr(U&);
    102107
    103     RefPtr<WeakReference> m_ref;
     108    RefPtr<WeakPtrImpl> m_impl;
    104109};
    105110
     
    113118    ~WeakPtrFactory()
    114119    {
    115         if (!m_ref)
     120        if (!m_impl)
    116121            return;
    117         m_ref->clear();
    118     }
    119 
    120     WeakPtr<T> createWeakPtr(T& ptr) const
    121     {
    122         if (!m_ref)
    123             m_ref = WeakReference::create(&ptr);
    124         return WeakPtr<T>(makeRef(*m_ref));
    125     }
    126 
    127     WeakPtr<const T> createWeakPtr(const T& ptr) const
    128     {
    129         if (!m_ref)
    130             m_ref = WeakReference::create(const_cast<T*>(&ptr));
    131         return WeakPtr<T>(makeRef(*m_ref));
     122        m_impl->clear();
     123    }
     124
     125    WeakPtr<T> createWeakPtr(T& object) const
     126    {
     127        if (!m_impl)
     128            m_impl = WeakPtrImpl::create(&object);
     129
     130        ASSERT(&object == m_impl->get<T>());
     131        return WeakPtr<T>(makeRef(*m_impl));
     132    }
     133
     134    WeakPtr<const T> createWeakPtr(const T& object) const
     135    {
     136        if (!m_impl)
     137            m_impl = WeakPtrImpl::create(const_cast<T*>(&object));
     138
     139        ASSERT(&object == m_impl->get<T>());
     140        return WeakPtr<T>(makeRef(*m_impl));
    132141    }
    133142
    134143    void revokeAll()
    135144    {
    136         if (!m_ref)
     145        if (!m_impl)
    137146            return;
    138147
    139         m_ref->clear();
    140         m_ref = nullptr;
     148        m_impl->clear();
     149        m_impl = nullptr;
    141150    }
    142151
     
    144153    template<typename> friend class WeakHashSet;
    145154
    146     mutable RefPtr<WeakReference> m_ref;
     155    mutable RefPtr<WeakPtrImpl> m_impl;
    147156};
    148157
     
    151160    typedef T WeakValueType;
    152161
    153     const WeakPtrFactory<T>& weakPtrFactory() const { return m_weakFactory; }
    154     WeakPtrFactory<T>& weakPtrFactory() { return m_weakFactory; }
    155 
    156 private:
    157     WeakPtrFactory<T> m_weakFactory;
    158 };
    159 
    160 template<typename T, typename U> inline WeakReference* weak_reference_cast(WeakReference* weakReference)
    161 {
    162     UNUSED_VARIABLE(static_cast<T*>(static_cast<typename U::WeakValueType*>(nullptr))); // Verify that casting is valid.
    163     return weakReference;
     162    const WeakPtrFactory<T>& weakPtrFactory() const { return m_weakPtrFactory; }
     163    WeakPtrFactory<T>& weakPtrFactory() { return m_weakPtrFactory; }
     164
     165private:
     166    WeakPtrFactory<T> m_weakPtrFactory;
     167};
     168
     169template<typename T, typename U> inline WeakPtrImpl* weak_ptr_impl_cast(WeakPtrImpl* impl)
     170{
     171    static_assert(std::is_same<typename T::WeakValueType, typename U::WeakValueType>::value, "Invalid weak pointer cast");
     172    return impl;
    164173}
    165174
    166175template<typename T> template<typename U> inline WeakPtr<T>::WeakPtr(const WeakPtr<U>& o)
    167     : m_ref(weak_reference_cast<T, U>(o.m_ref.get()))
     176    : m_impl(weak_ptr_impl_cast<T, U>(o.m_impl.get()))
    168177{
    169178}
    170179
    171180template<typename T> template<typename U> inline WeakPtr<T>::WeakPtr(WeakPtr<U>&& o)
    172     : m_ref(adoptRef(weak_reference_cast<T, U>(o.m_ref.leakRef())))
     181    : m_impl(adoptRef(weak_ptr_impl_cast<T, U>(o.m_impl.leakRef())))
    173182{
    174183}
     
    176185template<typename T> template<typename U> inline WeakPtr<T>& WeakPtr<T>::operator=(const WeakPtr<U>& o)
    177186{
    178     m_ref = weak_reference_cast<T, U>(o.m_ref.get());
     187    m_impl = weak_ptr_impl_cast<T, U>(o.m_impl.get());
    179188    return *this;
    180189}
     
    182191template<typename T> template<typename U> inline WeakPtr<T>& WeakPtr<T>::operator=(WeakPtr<U>&& o)
    183192{
    184     m_ref = adoptRef(weak_reference_cast<T, U>(o.m_ref.leakRef()));
     193    m_impl = adoptRef(weak_ptr_impl_cast<T, U>(o.m_impl.leakRef()));
    185194    return *this;
    186195}
    187196
    188 template<typename T> inline WeakPtr<T> makeWeakPtr(T& ref)
    189 {
    190     return { ref.weakPtrFactory().createWeakPtr(ref) };
     197template<typename T> inline WeakPtr<T> makeWeakPtr(T& object)
     198{
     199    return { object.weakPtrFactory().createWeakPtr(object) };
    191200}
    192201
     
    233242using WTF::WeakPtr;
    234243using WTF::WeakPtrFactory;
    235 using WTF::WeakReference;
    236244using WTF::makeWeakPtr;
  • trunk/Source/WebCore/ChangeLog

    r245970 r245972  
     12019-05-31  Geoffrey Garen  <ggaren@apple.com>
     2
     3        Some WeakPtr cleanup
     4        https://bugs.webkit.org/show_bug.cgi?id=198390
     5
     6        Reviewed by Chris Dumez.
     7
     8        * Modules/indexeddb/shared/InProcessIDBServer.cpp:
     9        (WebCore::storageQuotaManagerGetter): Dereference the weak pointer
     10        directly instead of using a weak pointer to guard a raw pointer. It's
     11        safer and more idiomatic to use weak pointers directly.
     12
     13        * Modules/indexeddb/shared/InProcessIDBServer.h: Use our base clase
     14        weakPtrFactory() definition instead of writing our own. Declare
     15        WeakValueType so we can dereference the weak pointer we create (above).
     16
    1172019-05-31  Zalan Bujtas  <zalan@apple.com>
    218
  • trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp

    r242911 r245972  
    7070static inline IDBServer::IDBServer::QuotaManagerGetter storageQuotaManagerGetter(InProcessIDBServer& server)
    7171{
    72     return [&server, weakServer = makeWeakPtr(server)](PAL::SessionID, const auto& origin) {
    73         return weakServer ? server.quotaManager(origin) : nullptr;
     72    return [weakServer = makeWeakPtr(server)](PAL::SessionID, const auto& origin) {
     73        return weakServer ? weakServer->quotaManager(origin) : nullptr;
    7474    };
    7575}
  • trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h

    r242911 r245972  
    5454class InProcessIDBServer final : public IDBClient::IDBConnectionToServerDelegate, public IDBServer::IDBConnectionToClientDelegate, public RefCounted<InProcessIDBServer>, public IDBServer::IDBBackingStoreTemporaryFileHandler {
    5555public:
     56    using IDBClient::IDBConnectionToServerDelegate::weakPtrFactory;
     57    typedef IDBClient::IDBConnectionToServerDelegate::WeakValueType WeakValueType;
     58
    5659    WEBCORE_EXPORT static Ref<InProcessIDBServer> create(PAL::SessionID);
    5760    WEBCORE_EXPORT static Ref<InProcessIDBServer> create(PAL::SessionID, const String& databaseDirectoryPath);
     
    125128    StorageQuotaManager* quotaManager(const ClientOrigin&);
    126129
    127     const WeakPtrFactory<IDBClient::IDBConnectionToServerDelegate>& weakPtrFactory() const { return IDBClient::IDBConnectionToServerDelegate::weakPtrFactory(); }
    128 
    129130private:
    130131    explicit InProcessIDBServer(PAL::SessionID);
  • trunk/Tools/ChangeLog

    r245968 r245972  
     12019-05-31  Geoffrey Garen  <ggaren@apple.com>
     2
     3        Some WeakPtr cleanup
     4        https://bugs.webkit.org/show_bug.cgi?id=198390
     5
     6        Reviewed by Chris Dumez.
     7
     8        * TestWebKitAPI/Tests/WTF/WeakPtr.cpp: Updated for rename.
     9
    1102019-05-31  Don Olmstead  <don.olmstead@sony.com>
    211
  • trunk/Tools/TestWebKitAPI/Tests/WTF/WeakPtr.cpp

    r245868 r245972  
    2828static unsigned s_baseWeakReferences = 0;
    2929
    30 #define DID_CREATE_WEAK_REFERENCE(p) do { \
     30#define DID_CREATE_WEAK_PTR_IMPL(p) do { \
    3131    ++s_baseWeakReferences; \
    3232} while (0);
    3333
    34 #define WILL_DESTROY_WEAK_REFERENCE(p) do { \
     34#define WILL_DESTROY_WEAK_PTR_IMPL(p) do { \
    3535    --s_baseWeakReferences; \
    3636} while (0);
Note: See TracChangeset for help on using the changeset viewer.