[Win] MSVC can't compile WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent >WebResourceLoadStatisticsStore.cpp >c:\webkit\gb\webkitbuild\debug\derivedsources\forwardingheaders\wtf\ref.h(61): error C2039: 'deref': is not a member of 'WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent::<lambda_2ce8022c49d1b38b3e0a628b677d335e>' >c:\webkit\gb\source\webkit\uiprocess\webresourceloadstatisticsstore.cpp(830): note: see declaration of 'WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent::<lambda_2ce8022c49d1b38b3e0a628b677d335e>' >c:\webkit\gb\webkitbuild\debug\derivedsources\forwardingheaders\wtf\ref.h(55): note: while compiling class template member function 'WTF::Ref<WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent::<lambda_2ce8022c49d1b38b3e0a628b677d335e>,WTF::DumbPtrTraits<T>>::~Ref(void)' > with > [ > T=WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent::<lambda_2ce8022c49d1b38b3e0a628b677d335e> > ] >c:\webkit\gb\source\webkit\uiprocess\webresourceloadstatisticsstore.cpp(826): note: see reference to function template instantiation 'WTF::Ref<WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent::<lambda_2ce8022c49d1b38b3e0a628b677d335e>,WTF::DumbPtrTraits<T>>::~Ref(void)' being compiled > with > [ > T=WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent::<lambda_2ce8022c49d1b38b3e0a628b677d335e> > ] >c:\webkit\gb\source\webkit\uiprocess\webresourceloadstatisticsstore.cpp(824): note: see reference to class template instantiation 'WTF::Ref<WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent::<lambda_2ce8022c49d1b38b3e0a628b677d335e>,WTF::DumbPtrTraits<T>>' being compiled > with > [ > T=WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent::<lambda_2ce8022c49d1b38b3e0a628b677d335e> > ]
Created attachment 336740 [details] WIP patch
I created a reproducer and reported to MS. https://godbolt.org/g/kZq5Fn https://msdn.microsoft.com/library/mt748084.aspx
Created attachment 336745 [details] Patch
Comment on attachment 336745 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=336745&action=review > Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp:824 > - grandfatherExistingWebsiteData([protectedThis = makeRef(*this), callback = WTFMove(callback)]() { > + grandfatherExistingWebsiteData([protectedThis = protectedThis.copyRef(), callback = WTFMove(callback)]() { protectedThis = WTFMove(protectedThis) There's no need to unnecessarily increment and decrement the ref count twice in this case.
Created attachment 336828 [details] Patch
Thank you for the review, Alex. I addressed the review feedback. Could you review again?
Comment on attachment 336828 [details] Patch Clearing flags on attachment: 336828 Committed r230162: <https://trac.webkit.org/changeset/230162>
All reviewed patches have been landed. Closing bug.
<rdar://problem/39110400>