Bug 204437

Summary: [MSVC] error C2039: 'weakPtrFactory': is not a member of 'WebCore::DocumentStorageAccess::requestStorageAccess::<lambda_3f2cfd7704f93d8fe19d5b5f064f8add>'
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: WebCore Misc.Assignee: Fujii Hironori <Hironori.Fujii>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, dbates, esprehn+autocc, ews-watchlist, kangil.han, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=204443
Attachments:
Description Flags
Patch
none
WIP patch
none
Patch for landing none

Fujii Hironori
Reported 2019-11-20 19:16:21 PST
[MSVC] error C2039: 'weakPtrFactory': is not a member of 'WebCore::DocumentStorageAccess::requestStorageAccess::<lambda_3f2cfd7704f93d8fe19d5b5f064f8add>' WinCairo can't compile since r252723 (Bug 204397). https://build.webkit.org/builders/WinCairo%2064-bit%20WKL%20Release%20%28Build%29/builds/13581 > FAILED: Source/WebCore/CMakeFiles/WebCore.dir/__/__/WebCore/DerivedSources/unified-sources/UnifiedSource-be65d27a-7.cpp.obj > C:\MSVS\VC\Tools\MSVC\14.20.27508\bin\Hostx64\x64\cl.exe (...) -c WebCore\DerivedSources\unified-sources\UnifiedSource-be65d27a-7.cpp > C:\WebKit-BuildWorker\wincairo-wkl-release\build\WebKitBuild\Release\WTF\Headers\wtf/WeakPtr.h(252): error C2039: 'weakPtrFactory': is not a member of 'WebCore::DocumentStorageAccess::requestStorageAccess::<lambda_3f2cfd7704f93d8fe19d5b5f064f8add>' > C:\WebKit-BuildWorker\wincairo-wkl-release\build\Source\WebCore\dom/DocumentStorageAccess.cpp(205): note: see declaration of 'WebCore::DocumentStorageAccess::requestStorageAccess::<lambda_3f2cfd7704f93d8fe19d5b5f064f8add>' > C:\WebKit-BuildWorker\wincairo-wkl-release\build\Source\WebCore\dom/DocumentStorageAccess.cpp(185): note: see reference to function template instantiation 'WTF::WeakPtr<WebCore::DocumentStorageAccess::requestStorageAccess::<lambda_3f2cfd7704f93d8fe19d5b5f064f8add>> WTF::makeWeakPtr<WebCore::DocumentStorageAccess::requestStorageAccess::<lambda_3f2cfd7704f93d8fe19d5b5f064f8add>>(T &)' being compiled > with > [ > T=WebCore::DocumentStorageAccess::requestStorageAccess::<lambda_3f2cfd7704f93d8fe19d5b5f064f8add> > ]
Attachments
Patch (3.12 KB, patch)
2019-11-20 19:34 PST, Fujii Hironori
no flags
WIP patch (1.23 KB, patch)
2019-11-20 20:12 PST, Fujii Hironori
no flags
Patch for landing (2.33 KB, patch)
2019-11-20 20:32 PST, Fujii Hironori
no flags
Fujii Hironori
Comment 1 2019-11-20 19:16:45 PST
This is a similar issue with r251999.
Fujii Hironori
Comment 2 2019-11-20 19:34:28 PST
Fujii Hironori
Comment 3 2019-11-20 20:02:16 PST
Comment on attachment 384020 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=384020&action=review > Source/WebCore/ChangeLog:11 > + the inner lambda. It seems that the outer lambda is executed in the main thread. It's safe to dereference the weak ptr in the outer lambda. I don't need to create two weak ptrs. Will fix.
Fujii Hironori
Comment 4 2019-11-20 20:12:23 PST
Created attachment 384023 [details] WIP patch
Fujii Hironori
Comment 5 2019-11-20 20:19:44 PST
[MSConnect 3128879] C++: 'this' in capture expression of nested lambda resolves to the enclosing closure rather than the enclosing class instance - Developer Community https://developercommunity.visualstudio.com/content/problem/30060/c-this-in-capture-expression-of-nested-lambda-reso.html This captured in nested lambda when used in capture list results in this being an instance of lambda but not of the surrounding class - Developer Community https://developercommunity.visualstudio.com/content/problem/292128/this-captured-in-nested-lambda-when-used-in-captur.html
Fujii Hironori
Comment 6 2019-11-20 20:23:02 PST
https://developercommunity.visualstudio.com/solutions/809339/view.html > Please try to use /std:c++latest instead of /std:c++17 as it’s about new lambda processor. It also works with /experimental:newLambdaProcessor.
Fujii Hironori
Comment 7 2019-11-20 20:32:22 PST
Created attachment 384024 [details] Patch for landing
Fujii Hironori
Comment 8 2019-11-20 20:36:04 PST
Radar WebKit Bug Importer
Comment 9 2019-11-20 20:37:24 PST
Ryosuke Niwa
Comment 10 2019-11-20 20:44:08 PST
Oh, thanks for the fix.
Fujii Hironori
Comment 11 2019-11-20 20:51:54 PST
Bug 187035 – [Win] 'deref': is not a member of 'WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioningForDomains::<lambda_9d761a6dc12d95db7fa2d6f3f5aa26fa>' Bug 184120 – [Win] MSVC can't compile WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent These were also same.
Note You need to log in before you can comment on or make changes to this bug.