Title: [211076] trunk/Source/WebKit2
Revision
211076
Author
[email protected]
Date
2017-01-23 22:01:27 -0800 (Mon, 23 Jan 2017)

Log Message

Maintain ordering when doing speculative loads
https://bugs.webkit.org/show_bug.cgi?id=167324

Forgot to implement a review comment.

* NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:
(WebKit::NetworkCache::makeSubresourceInfoVector):

Allocated initial capacity and use uncheckedAppend.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (211075 => 211076)


--- trunk/Source/WebKit2/ChangeLog	2017-01-24 03:19:03 UTC (rev 211075)
+++ trunk/Source/WebKit2/ChangeLog	2017-01-24 06:01:27 UTC (rev 211076)
@@ -1,3 +1,15 @@
+2017-01-23  Antti Koivisto  <[email protected]>
+
+        Maintain ordering when doing speculative loads
+        https://bugs.webkit.org/show_bug.cgi?id=167324
+
+        Forgot to implement a review comment.
+
+        * NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:
+        (WebKit::NetworkCache::makeSubresourceInfoVector):
+
+        Allocated initial capacity and use uncheckedAppend.
+
 2017-01-23  Commit Queue  <[email protected]>
 
         Unreviewed, rolling out r211062.

Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp (211075 => 211076)


--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp	2017-01-24 03:19:03 UTC (rev 211075)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp	2017-01-24 06:01:27 UTC (rev 211076)
@@ -107,13 +107,13 @@
 static Vector<SubresourceInfo> makeSubresourceInfoVector(const Vector<std::unique_ptr<SubresourceLoad>>& subresourceLoads)
 {
     Vector<SubresourceInfo> result;
-    result.reserveCapacity(subresourceLoads.size());
+    result.reserveInitialCapacity(subresourceLoads.size());
     
     HashSet<Key> seenKeys;
     for (auto& load : subresourceLoads) {
         if (!seenKeys.add(load->key).isNewEntry)
             continue;
-        result.append({ load->key, load->request });
+        result.uncheckedAppend({ load->key, load->request });
     }
 
     return result;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to