Bug 173555 - Fix warnings for unused lambda captures in Source/WebKit
Summary: Fix warnings for unused lambda captures in Source/WebKit
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Frédéric Wang (:fredw)
URL:
Keywords: InRadar
Depends on: 173808
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-19 11:12 PDT by Konstantin Tokarev
Modified: 2018-04-02 05:46 PDT (History)
9 users (show)

See Also:


Attachments
Patch (8.60 KB, patch)
2017-06-19 11:13 PDT, Konstantin Tokarev
no flags Details | Formatted Diff | Diff
Patch (9.56 KB, patch)
2017-06-19 11:30 PDT, Konstantin Tokarev
no flags Details | Formatted Diff | Diff
Patch (8.68 KB, patch)
2018-04-02 02:06 PDT, Frédéric Wang (:fredw)
no flags Details | Formatted Diff | Diff
Patch (8.95 KB, patch)
2018-04-02 03:50 PDT, Frédéric Wang (:fredw)
annulen: review+
Details | Formatted Diff | Diff

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