Bug 173555

Summary: Fix warnings for unused lambda captures in Source/WebKit
Product: WebKit Reporter: Konstantin Tokarev <annulen>
Component: WebKit Misc.Assignee: Frédéric Wang (:fredw) <fred.wang>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, commit-queue, darin, fred.wang, joepeck, mcatanzaro, ryanhaddad, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 173808    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch annulen: review+

Description Konstantin Tokarev 2017-06-19 11:12:22 PDT
Remove unused lamda captures from WebKit2
Comment 1 Konstantin Tokarev 2017-06-19 11:13:43 PDT
Created attachment 313313 [details]
Patch
Comment 2 Konstantin Tokarev 2017-06-19 11:30:57 PDT
Created attachment 313316 [details]
Patch
Comment 3 WebKit Commit Bot 2017-06-19 13:14:57 PDT
Comment on attachment 313316 [details]
Patch

Clearing flags on attachment: 313316

Committed r218503: <http://trac.webkit.org/changeset/218503>
Comment 4 WebKit Commit Bot 2017-06-19 13:14:59 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Ryan Haddad 2017-06-19 13:40:56 PDT
(In reply to WebKit Commit Bot from comment #3)
> Comment on attachment 313316 [details]
> Patch
> 
> Clearing flags on attachment: 313316
> 
> Committed r218503: <http://trac.webkit.org/changeset/218503>

This change broke the 32-bit build on macOS Sierra:

https://build.webkit.org/builders/Apple%20Sierra%20Release%20%2832-bit%20Build%29/builds/2730
Comment 6 Ryan Haddad 2017-06-19 13:49:22 PDT
(In reply to Ryan Haddad from comment #5)
> (In reply to WebKit Commit Bot from comment #3)
> > Comment on attachment 313316 [details]
> > Patch
> > 
> > Clearing flags on attachment: 313316
> > 
> > Committed r218503: <http://trac.webkit.org/changeset/218503>
> 
> This change broke the 32-bit build on macOS Sierra:
> 
> https://build.webkit.org/builders/Apple%20Sierra%20Release%20%2832-
> bit%20Build%29/builds/2730
Actually, it broke all of the Sierra builds:
https://build.webkit.org/builders/Apple%20Sierra%20Release%20%28Build%29/builds/2875
https://build.webkit.org/builders/Apple%20Sierra%20Debug%20%28Build%29/builds/2867
Comment 7 Ryan Haddad 2017-06-19 13:54:19 PDT
Reverted r218503 for reason:

This change broke the macOS Sierra build.

Committed r218506: <http://trac.webkit.org/changeset/218506>
Comment 8 Michael Catanzaro 2017-06-23 18:24:46 PDT
Planning to fix and reland this?
Comment 9 Konstantin Tokarev 2017-06-24 03:09:37 PDT
Let's try
Comment 10 Konstantin Tokarev 2017-06-24 03:16:44 PDT
Committed r218785: <http://trac.webkit.org/changeset/218785>
Comment 11 WebKit Commit Bot 2017-06-24 03:22:56 PDT
Re-opened since this is blocked by bug 173808
Comment 12 Frédéric Wang (:fredw) 2018-04-02 02:05:40 PDT
After upgrade to XCode 9.3 (30 March 2018), iOS builds are now failing with the warning:

"lambda capture 'this' is not used [-Wunused-lambda-capture]"

So I suspect we will eventually need to take Konstantin's patch.
Comment 13 Frédéric Wang (:fredw) 2018-04-02 02:06:49 PDT
Created attachment 336973 [details]
Patch

Just rebasing attachment 313316 [details]...
Comment 14 Frédéric Wang (:fredw) 2018-04-02 03:50:41 PDT
Created attachment 336975 [details]
Patch
Comment 15 Frédéric Wang (:fredw) 2018-04-02 05:45:11 PDT
Committed r230153: <https://trac.webkit.org/changeset/230153>
Comment 16 Radar WebKit Bug Importer 2018-04-02 05:46:21 PDT
<rdar://problem/39102921>
Comment 17 Konstantin Tokarev 2018-04-02 05:46:58 PDT
I don't actually like amount of code line overhead and fact that unused variables are captured (though maybe compiler optimizes them away, I didn't check), but in these particular usages it's fine with me. If this situation repeats in other places, we may need to consider some other solution