WebKit Bugzilla
Attachment 362628 Details for
Bug 194913
: [MSVC] Fix compilation errors with lambdas in ResourceLoadStatistics
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194913.diff (text/plain), 3.82 KB, created by
Don Olmstead
on 2019-02-21 12:40:38 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Don Olmstead
Created:
2019-02-21 12:40:38 PST
Size:
3.82 KB
patch
obsolete
>diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 4cfd434b7da..2c2caa4990d 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,18 @@ >+2019-02-21 Don Olmstead <don.olmstead@sony.com> >+ >+ [MSVC] Fix compilation errors with lambdas in ResourceLoadStatistics >+ https://bugs.webkit.org/show_bug.cgi?id=194913 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ MSVC has problems with the scoping of `this` within a nested lambda. To work around the >+ behavior the enclosing lambda's wrapping of `this` is used within the nested lambda. >+ >+ * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: >+ (WebKit::ResourceLoadStatisticsMemoryStore::processStatisticsAndDataRecords): >+ * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: >+ (WebKit::WebResourceLoadStatisticsStore::requestStorageAccessGranted): >+ > 2019-02-21 Chris Dumez <cdumez@apple.com> > > Unreviewed API test fix after r241855. >diff --git a/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp b/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp >index 7ee2ad10100..4183c0c6509 100644 >--- a/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp >+++ b/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp >@@ -354,7 +354,7 @@ void ResourceLoadStatisticsMemoryStore::processStatisticsAndDataRecords() > } > } > >- removeDataRecords([this, weakThis = makeWeakPtr(*this)] { >+ removeDataRecords([this, weakThis = makeWeakPtr(*this)]() mutable { > ASSERT(!RunLoop::isMain()); > if (!weakThis) > return; >@@ -366,7 +366,7 @@ void ResourceLoadStatisticsMemoryStore::processStatisticsAndDataRecords() > if (!m_parameters.shouldNotifyPagesWhenDataRecordsWereScanned) > return; > >- RunLoop::main().dispatch([this, weakThis = makeWeakPtr(*this)] { >+ RunLoop::main().dispatch([this, weakThis = WTFMove(weakThis)]() { > ASSERT(RunLoop::isMain()); > if (!weakThis) > return; >diff --git a/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp b/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp >index e0dac21d679..30fe91f4c08 100644 >--- a/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp >+++ b/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp >@@ -30,6 +30,7 @@ > > #include "APIDictionary.h" > #include "Logging.h" >+#include "NetworkProcess.h" > #include "NetworkSession.h" > #include "ResourceLoadStatisticsMemoryStore.h" > #include "ResourceLoadStatisticsPersistentStorage.h" >@@ -305,7 +306,7 @@ void WebResourceLoadStatisticsStore::requestStorageAccessGranted(const String& s > ASSERT_UNUSED(promptEnabled, promptEnabled); > auto subFramePrimaryDomain = ResourceLoadStatistics::primaryDomain(subFrameHost); > auto topFramePrimaryDomain = ResourceLoadStatistics::primaryDomain(topFrameHost); >- CompletionHandler<void(bool)> requestConfirmationCompletionHandler = [this, protectedThis = makeRef(*this), subFrameHost = WTFMove(subFrameHost), topFrameHost = WTFMove(topFrameHost), frameID, pageID, completionHandler = WTFMove(completionHandler)] (bool userDidGrantAccess) mutable { >+ CompletionHandler<void(bool)> requestConfirmationCompletionHandler = [this, protectedThis = protectedThis.copyRef(), subFrameHost = WTFMove(subFrameHost), topFrameHost = WTFMove(topFrameHost), frameID, pageID, completionHandler = WTFMove(completionHandler)] (bool userDidGrantAccess) mutable { > if (userDidGrantAccess) > grantStorageAccess(WTFMove(subFrameHost), WTFMove(topFrameHost), frameID, pageID, userDidGrantAccess, WTFMove(completionHandler)); > else
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194913
: 362628