Bug 261448

Summary: RemoteInspectorSocket.cpp: error: implicit capture of 'this' with a capture default of '=' is deprecated [-Werror,-Wdeprecated-this-capture]
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: JavaScriptCoreAssignee: Fujii Hironori <Hironori.Fujii>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Fujii Hironori 2023-09-11 17:59:41 PDT
Clang 17 reports the following compiler warnings for Windows port:

FAILED: Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-84c9f43f-7.cpp.obj 
D:\work\chromium\src\src\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe  [...] -c -- C:\home\webkit\gc\WebKitBuild\Debug\JavaScriptCore\DerivedSources\unified-sources\UnifiedSource-84c9f43f-7.cpp
In file included from C:\home\webkit\gc\WebKitBuild\Debug\JavaScriptCore\DerivedSources\unified-sources\UnifiedSource-84c9f43f-7.cpp:2:
C:\home\webkit\gc\Source\JavaScriptCore\inspector/remote/socket/RemoteInspectorSocket.cpp(73,25): error: implicit capture of 'this' with a capture default of '=' is deprecated [-Werror,-Wdeprecated-this-capture]
   73 |         Locker locker { m_mutex };
      |                         ^
C:\home\webkit\gc\Source\JavaScriptCore\inspector/remote/socket/RemoteInspectorSocket.cpp(72,34): note: add an explicit capture of 'this' to capture '*this' by reference
   72 |     RunLoop::current().dispatch([=] {
      |                                  ^
      |                                   , this
C:\home\webkit\gc\Source\JavaScriptCore\inspector/remote/socket/RemoteInspectorSocket.cpp(185,25): error: implicit capture of 'this' with a capture default of '=' is deprecated [-Werror,-Wdeprecated-this-capture]
  185 |         Locker locker { m_mutex };
      |                         ^
C:\home\webkit\gc\Source\JavaScriptCore\inspector/remote/socket/RemoteInspectorSocket.cpp(184,34): note: add an explicit capture of 'this' to capture '*this' by reference
  184 |     RunLoop::current().dispatch([=] {
      |                                  ^
      |                                   , this
2 errors generated.
Comment 1 Fujii Hironori 2023-09-11 18:18:35 PDT
Pull request: https://github.com/WebKit/WebKit/pull/17681
Comment 2 EWS 2023-09-11 20:08:11 PDT
Committed 267892@main (4132ced62b83): <https://commits.webkit.org/267892@main>

Reviewed commits have been landed. Closing PR #17681 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2023-09-11 20:09:13 PDT
<rdar://problem/115328869>