Title: [223861] trunk/Source/WebKit
Revision
223861
Author
[email protected]
Date
2017-10-23 16:23:05 -0700 (Mon, 23 Oct 2017)

Log 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.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (223860 => 223861)


--- trunk/Source/WebKit/ChangeLog	2017-10-23 22:37:33 UTC (rev 223860)
+++ trunk/Source/WebKit/ChangeLog	2017-10-23 23:23:05 UTC (rev 223861)
@@ -1,3 +1,15 @@
+2017-10-23  Alex Christensen  <[email protected]>
+
+        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.
+
 2017-10-23  Tim Horton  <[email protected]>
 
         Stop using _UIApplicationUsesLegacyUI()

Modified: trunk/Source/WebKit/UIProcess/WebBackForwardList.cpp (223860 => 223861)


--- trunk/Source/WebKit/UIProcess/WebBackForwardList.cpp	2017-10-23 22:37:33 UTC (rev 223860)
+++ trunk/Source/WebKit/UIProcess/WebBackForwardList.cpp	2017-10-23 23:23:05 UTC (rev 223861)
@@ -374,14 +374,11 @@
 
     m_currentIndex = 0;
 
-    if (currentItem) {
-        m_entries.shrink(1);
-        m_entries[0] = currentItem.releaseNonNull();
-    } else {
-        m_entries.clear();
+    m_entries.clear();
+    if (currentItem)
+        m_entries.append(currentItem.releaseNonNull());
+    else
         m_hasCurrentIndex = false;
-    }
-
     m_page->didChangeBackForwardList(nullptr, WTFMove(removedItems));
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to