Simplify a couple of lambda captures in the network cache code
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 May 2016 05:18:00 +0000 (05:18 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 May 2016 05:18:00 +0000 (05:18 +0000)
commit1aab788df637df6825ef697047fcf8eb7968367f
tree7cf084abdba20a0b3cd274f28ad4b74c90464f20
parent48e5b116b56ada67618b3a718f9548e11bfa6e3b
Simplify a couple of lambda captures in the network cache code
https://bugs.webkit.org/show_bug.cgi?id=158053

Reviewed by Brady Eidson.

* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
(WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
Just capture subResourceInfo instead of allocating a new copy
on the heap. There is no reason we cannot simply capture
subResourceInfo here.

* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::clear):
Use new C++14 capture with initialization to make the code a
bit nicer.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201371 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp
Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp