Title: [182011] trunk/Source/WebKit2
Revision
182011
Author
[email protected]
Date
2015-03-26 09:24:06 -0700 (Thu, 26 Mar 2015)

Log Message

[WK2] Let the compiler generate the NetworkCache::Key move constructor
https://bugs.webkit.org/show_bug.cgi?id=143079

Reviewed by Antti Koivisto.

Let the compiler generate the NetworkCache::Key move constructor. The
generated one will do exactly the same thing as the one we had except
that it will move the m_hash member as well. I don't see any reason why
we weren't moving this member before (it is an std::array<uint8_t, 16>).

Also have the compiler generate a move assignment operator for
consistency. Although it is not currently useful, it could be at some
point.

* NetworkProcess/cache/NetworkCacheKey.cpp:
(WebKit::NetworkCache::Key::Key): Deleted.
* NetworkProcess/cache/NetworkCacheKey.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (182010 => 182011)


--- trunk/Source/WebKit2/ChangeLog	2015-03-26 16:21:44 UTC (rev 182010)
+++ trunk/Source/WebKit2/ChangeLog	2015-03-26 16:24:06 UTC (rev 182011)
@@ -1,5 +1,25 @@
 2015-03-26  Chris Dumez  <[email protected]>
 
+        [WK2] Let the compiler generate the NetworkCache::Key move constructor
+        https://bugs.webkit.org/show_bug.cgi?id=143079
+
+        Reviewed by Antti Koivisto.
+
+        Let the compiler generate the NetworkCache::Key move constructor. The
+        generated one will do exactly the same thing as the one we had except
+        that it will move the m_hash member as well. I don't see any reason why
+        we weren't moving this member before (it is an std::array<uint8_t, 16>).
+
+        Also have the compiler generate a move assignment operator for
+        consistency. Although it is not currently useful, it could be at some
+        point.
+
+        * NetworkProcess/cache/NetworkCacheKey.cpp:
+        (WebKit::NetworkCache::Key::Key): Deleted.
+        * NetworkProcess/cache/NetworkCacheKey.h:
+
+2015-03-26  Chris Dumez  <[email protected]>
+
         [WK2][NetworkCache] Compute if a cached response has expired only when actually needed
         https://bugs.webkit.org/show_bug.cgi?id=143070
 

Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheKey.cpp (182010 => 182011)


--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheKey.cpp	2015-03-26 16:21:44 UTC (rev 182010)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheKey.cpp	2015-03-26 16:24:06 UTC (rev 182011)
@@ -44,14 +44,6 @@
 {
 }
 
-Key::Key(Key&& o)
-    : m_method(WTF::move(o.m_method))
-    , m_partition(WTF::move(o.m_partition))
-    , m_identifier(WTF::move(o.m_identifier))
-    , m_hash(o.m_hash)
-{
-}
-
 Key::Key(const String& method, const String& partition, const String& identifier)
     : m_method(method.isolatedCopy())
     , m_partition(partition.isolatedCopy())

Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheKey.h (182010 => 182011)


--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheKey.h	2015-03-26 16:21:44 UTC (rev 182010)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheKey.h	2015-03-26 16:24:06 UTC (rev 182011)
@@ -43,10 +43,11 @@
 
     Key() { }
     Key(const Key&);
-    Key(Key&&);
+    Key(Key&&) = default;
     Key(const String& method, const String& partition, const String& identifier);
 
     Key& operator=(const Key&);
+    Key& operator=(Key&&) = default;
 
     bool isNull() const { return m_identifier.isNull(); }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to