Ignore:
Timestamp:
Jul 4, 2015, 12:42:18 PM (10 years ago)
Author:
Chris Dumez
Message:

Drop RefPtr::clear() method
https://bugs.webkit.org/show_bug.cgi?id=146556

Reviewed by Brady Eidson.

Source/JavaScriptCore:

Drop RefPtr::clear() method in favor of "= nullptr;" pattern.

Source/WebCore:

Drop RefPtr::clear() method in favor of "= nullptr;" pattern.

Source/WebKit:

Drop RefPtr::clear() method in favor of "= nullptr;" pattern.

Source/WebKit/mac:

Drop RefPtr::clear() method in favor of "= nullptr;" pattern.

Source/WebKit/win:

Drop RefPtr::clear() method in favor of "= nullptr;" pattern.

Source/WebKit2:

Drop RefPtr::clear() method in favor of "= nullptr;" pattern.

Source/WTF:

Drop RefPtr::clear() method in favor of "= nullptr;" pattern.
Also made the "= nullptr;" pattern as efficient as clear()
by providing a operator=(nullptr_t) overload. Local micro-
benchmarking showed that "= nullptr;" used to be ~1.7% slower
than clear().

Tools:

Drop RefPtr::clear() method in favor of "= nullptr;" pattern.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/Storage/StorageAreaSync.cpp

    r182365 r186279  
    8989    // FIXME: We do this to avoid races, but it'd be better to make things safe without blocking.
    9090    blockUntilImportComplete();
    91     m_storageArea = 0; // This is done in blockUntilImportComplete() but this is here as a form of documentation that we must be absolutely sure the ref count cycle is broken.
     91    m_storageArea = nullptr; // This is done in blockUntilImportComplete() but this is here as a form of documentation that we must be absolutely sure the ref count cycle is broken.
    9292
    9393    if (m_syncTimer.isActive())
     
    376376    while (!m_importComplete)
    377377        m_importCondition.wait(m_importLock);
    378     m_storageArea = 0;
     378    m_storageArea = nullptr;
    379379}
    380380
Note: See TracChangeset for help on using the changeset viewer.