Bug 186543

Summary: Make CompletionHandler more const correct
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cgarcia, cmarcelo, dbates, esprehn+autocc, ews-watchlist, japhet, kangil.han, mcatanzaro, saam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Archive of layout-test-results from ews205 for win-future
none
Patch
none
Patch
none
Archive of layout-test-results from ews206 for win-future
none
Patch saam: review+

Description Alex Christensen 2018-06-11 15:05:37 PDT
Make CompletionHandler more const correct
Comment 1 Alex Christensen 2018-06-11 15:11:17 PDT
Created attachment 342470 [details]
Patch
Comment 2 Alex Christensen 2018-06-11 16:43:39 PDT
Created attachment 342483 [details]
Patch
Comment 3 Michael Catanzaro 2018-06-11 17:54:54 PDT
Comment on attachment 342483 [details]
Patch

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

I don't have a strong opinion on whether we should do this, just a nit:

> Source/WTF/wtf/CompletionHandler.h:34
> -// Wraps a WTF::Function to make sure it is always called once and only once.
> +// Wraps a Function to make sure it is always called once and only once on the correct thread.

This change belongs in bug #186171.
Comment 4 EWS Watchlist 2018-06-11 21:01:30 PDT
Comment on attachment 342483 [details]
Patch

Attachment 342483 [details] did not pass win-ews (win):
Output: http://webkit-queues.webkit.org/results/8141424

New failing tests:
http/tests/security/video-poster-cross-origin-crash2.html
Comment 5 EWS Watchlist 2018-06-11 21:01:42 PDT
Created attachment 342513 [details]
Archive of layout-test-results from ews205 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews205  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 6 Alex Christensen 2018-06-12 11:30:29 PDT
Created attachment 342567 [details]
Patch
Comment 7 Alex Christensen 2018-06-12 16:23:21 PDT
Created attachment 342609 [details]
Patch
Comment 8 EWS Watchlist 2018-06-12 22:57:40 PDT
Comment on attachment 342609 [details]
Patch

Attachment 342609 [details] did not pass win-ews (win):
Output: http://webkit-queues.webkit.org/results/8156705

New failing tests:
http/tests/security/local-video-source-from-remote.html
http/tests/preload/onload_event.html
Comment 9 EWS Watchlist 2018-06-12 22:57:51 PDT
Created attachment 342635 [details]
Archive of layout-test-results from ews206 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews206  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 10 Alex Christensen 2018-06-13 10:14:56 PDT
I think the windows failures are unrelated.
Comment 11 Alex Christensen 2018-07-27 14:57:39 PDT
Created attachment 345959 [details]
Patch
Comment 12 Saam Barati 2018-07-27 15:06:28 PDT
Comment on attachment 345959 [details]
Patch

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

> Source/WTF/wtf/CompletionHandler.h:56
> +    Out operator()(In... in)

I think for perfect forwarding you want (In&... in)
Comment 13 Alex Christensen 2018-07-27 15:08:49 PDT
(In reply to Saam Barati from comment #12)
> Comment on attachment 345959 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=345959&action=review
> 
> > Source/WTF/wtf/CompletionHandler.h:56
> > +    Out operator()(In... in)
> 
> I think for perfect forwarding you want (In&... in)

Right now it's the same as WTF::Function.  Let's change both of them in another patch if it does anything.
Comment 14 Alex Christensen 2018-07-27 15:30:22 PDT
https://trac.webkit.org/changeset/234332/webkit
Comment 15 Radar WebKit Bug Importer 2018-07-27 15:33:12 PDT
<rdar://problem/42677497>