Bug 158053

Summary: Simplify a couple of lambda captures in the network cache code
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, commit-queue, koivisto
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Chris Dumez 2016-05-24 20:48:20 PDT
Simplify a couple of lambda captures in the network cache code.
Comment 1 Chris Dumez 2016-05-24 20:51:13 PDT
Created attachment 279738 [details]
Patch
Comment 2 Brady Eidson 2016-05-24 21:53:49 PDT
Comment on attachment 279738 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=279738&action=review

> Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp:-902
> -    // Avoid non-thread safe std::function copies.
> -    auto* completionHandlerPtr = completionHandler ? new std::function<void ()>(WTFMove(completionHandler)) : nullptr;

I see this comment, and it makes me wonder - How much thread hopping does the NetworkCacheStorage code do?

We have a mechanism for this called "createCrossThreadTask" that perhaps you should look in to going forward.
Comment 3 WebKit Commit Bot 2016-05-24 22:16:52 PDT
Comment on attachment 279738 [details]
Patch

Clearing flags on attachment: 279738

Committed r201371: <http://trac.webkit.org/changeset/201371>
Comment 4 WebKit Commit Bot 2016-05-24 22:16:57 PDT
All reviewed patches have been landed.  Closing bug.