Changeset 223861 in webkit


Ignore:
Timestamp:
Oct 23, 2017 4:23:05 PM (7 years ago)
Author:
achristensen@apple.com
Message:

Fix ASAN test after r222824
https://bugs.webkit.org/show_bug.cgi?id=178688
<rdar://problem/35104706>

Reviewed by Tim Horton.

  • UIProcess/WebBackForwardList.cpp:

(WebKit::WebBackForwardList::clear):
Resizing a list of Ref<T> after we've WTFMoved all the elements doesn't make ASAN happy.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r223857 r223861  
     12017-10-23  Alex Christensen  <achristensen@webkit.org>
     2
     3        Fix ASAN test after r222824
     4        https://bugs.webkit.org/show_bug.cgi?id=178688
     5        <rdar://problem/35104706>
     6
     7        Reviewed by Tim Horton.
     8
     9        * UIProcess/WebBackForwardList.cpp:
     10        (WebKit::WebBackForwardList::clear):
     11        Resizing a list of Ref<T> after we've WTFMoved all the elements doesn't make ASAN happy.
     12
    1132017-10-23  Tim Horton  <timothy_horton@apple.com>
    214
  • trunk/Source/WebKit/UIProcess/WebBackForwardList.cpp

    r222824 r223861  
    375375    m_currentIndex = 0;
    376376
    377     if (currentItem) {
    378         m_entries.shrink(1);
    379         m_entries[0] = currentItem.releaseNonNull();
    380     } else {
    381         m_entries.clear();
     377    m_entries.clear();
     378    if (currentItem)
     379        m_entries.append(currentItem.releaseNonNull());
     380    else
    382381        m_hasCurrentIndex = false;
    383     }
    384 
    385382    m_page->didChangeBackForwardList(nullptr, WTFMove(removedItems));
    386383}
Note: See TracChangeset for help on using the changeset viewer.