Changeset 216700 in webkit


Ignore:
Timestamp:
May 11, 2017 4:33:30 PM (7 years ago)
Author:
Chris Dumez
Message:

Annotate Ref::ptr() with RETURNS_NONNULL
https://bugs.webkit.org/show_bug.cgi?id=171996

Reviewed by Andreas Kling.

Annotate Ref::ptr() with RETURNS_NONNULL as it can never return null.

  • wtf/Ref.h:

(WTF::Ref::ptr): Deleted.

Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r216696 r216700  
     12017-05-11  Chris Dumez  <cdumez@apple.com>
     2
     3        Annotate Ref::ptr() with RETURNS_NONNULL
     4        https://bugs.webkit.org/show_bug.cgi?id=171996
     5
     6        Reviewed by Andreas Kling.
     7
     8        Annotate Ref::ptr() with RETURNS_NONNULL as it can never return null.
     9
     10        * wtf/Ref.h:
     11        (WTF::Ref::ptr): Deleted.
     12
    1132017-05-11  Joseph Pecoraro  <pecoraro@apple.com>
    214
  • trunk/Source/WTF/wtf/Ref.h

    r213386 r216700  
    135135
    136136    T* operator->() const { ASSERT(m_ptr); return m_ptr; }
    137     T* ptr() const { ASSERT(m_ptr); return m_ptr; }
     137    T* ptr() const RETURNS_NONNULL { ASSERT(m_ptr); return m_ptr; }
    138138    T& get() const { ASSERT(m_ptr); return *m_ptr; }
    139139    operator T&() const { ASSERT(m_ptr); return *m_ptr; }
Note: See TracChangeset for help on using the changeset viewer.