Bug 141273

Summary: Avoid copying std::functions across threads in NetworkCacheStorage
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, psolanki
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
none
rebased kling: review+

Description Antti Koivisto 2015-02-04 16:19:51 PST
The current behavior is bug-prone.
Comment 1 Antti Koivisto 2015-02-04 16:38:00 PST
Created attachment 246066 [details]
patch
Comment 2 Antti Koivisto 2015-02-04 16:45:33 PST
Created attachment 246067 [details]
rebased
Comment 3 WebKit Commit Bot 2015-02-04 16:48:01 PST
Attachment 246067 [details] did not pass style-queue:


ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.h:167:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.h:174:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCacheStorageCocoa.mm:410:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 3 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Andreas Kling 2015-02-04 16:49:12 PST
Comment on attachment 246067 [details]
rebased

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

r=me

> Source/WebKit2/NetworkProcess/cache/NetworkCacheStorageCocoa.mm:359
> +    auto& retrieve = *retrieveOperation;

Whenever I see code like this it makes me wonder if we should have a never-null unique_ptr.
Comment 5 Antti Koivisto 2015-02-05 06:32:10 PST
https://trac.webkit.org/r179690