Bug 158053 - Simplify a couple of lambda captures in the network cache code
Summary: Simplify a couple of lambda captures in the network cache code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-24 20:48 PDT by Chris Dumez
Modified: 2016-05-24 22:16 PDT (History)
3 users (show)

See Also:


Attachments
Patch (4.35 KB, patch)
2016-05-24 20:51 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.