Unreviewed, rolling out r187812.
[WebKit-https.git] / Source / WebKit2 / Platform / IPC / ArgumentCoders.h
index de65ff35c7e857f3e2e97cc5a93c6b5c1cfec97e..983820275756fa32b4aa0dfa4730e20496fce2a6 100644 (file)
@@ -164,15 +164,15 @@ template<typename T, size_t inlineCapacity> struct VectorArgumentCoder<false, T,
             return false;
 
         Vector<T, inlineCapacity> tmp;
-        tmp.reserveInitialCapacity(size);
         for (size_t i = 0; i < size; ++i) {
             T element;
             if (!decoder.decode(element))
                 return false;
             
-            tmp.uncheckedAppend(WTF::move(element));
+            tmp.append(WTF::move(element));
         }
 
+        tmp.shrinkToFit();
         vector.swap(tmp);
         return true;
     }