Title: [252726] trunk/Source/WebCore
Revision
252726
Author
[email protected]
Date
2019-11-20 20:34:19 -0800 (Wed, 20 Nov 2019)

Log Message

[MSVC] error C2039: 'weakPtrFactory': is not a member of 'WebCore::DocumentStorageAccess::requestStorageAccess::<lambda_3f2cfd7704f93d8fe19d5b5f064f8add>'
https://bugs.webkit.org/show_bug.cgi?id=204437

Unreviewed build fix.

MSVC has a bug of a outer lambda's captured 'this' can't be used as
a lambda capture initializer of a inner lambda.

* dom/DocumentStorageAccess.cpp:
(WebCore::DocumentStorageAccess::requestStorageAccess): Replaced '*this' in the lambda capture initializer with '*weakThis'.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (252725 => 252726)


--- trunk/Source/WebCore/ChangeLog	2019-11-21 02:00:20 UTC (rev 252725)
+++ trunk/Source/WebCore/ChangeLog	2019-11-21 04:34:19 UTC (rev 252726)
@@ -1,3 +1,16 @@
+2019-11-20  Fujii Hironori  <[email protected]>
+
+        [MSVC] error C2039: 'weakPtrFactory': is not a member of 'WebCore::DocumentStorageAccess::requestStorageAccess::<lambda_3f2cfd7704f93d8fe19d5b5f064f8add>'
+        https://bugs.webkit.org/show_bug.cgi?id=204437
+
+        Unreviewed build fix.
+
+        MSVC has a bug of a outer lambda's captured 'this' can't be used as
+        a lambda capture initializer of a inner lambda.
+
+        * dom/DocumentStorageAccess.cpp:
+        (WebCore::DocumentStorageAccess::requestStorageAccess): Replaced '*this' in the lambda capture initializer with '*weakThis'.
+
 2019-11-20  Simon Fraser  <[email protected]>
 
         getComputedStyle returns "auto" for zIndex property even after it has been set, on non-positioned elements

Modified: trunk/Source/WebCore/dom/DocumentStorageAccess.cpp (252725 => 252726)


--- trunk/Source/WebCore/dom/DocumentStorageAccess.cpp	2019-11-21 02:00:20 UTC (rev 252725)
+++ trunk/Source/WebCore/dom/DocumentStorageAccess.cpp	2019-11-21 04:34:19 UTC (rev 252726)
@@ -182,7 +182,7 @@
         bool shouldPreserveUserGesture = wasGranted == StorageAccessWasGranted::Yes || promptWasShown == StorageAccessPromptWasShown::No;
 
         if (shouldPreserveUserGesture) {
-            m_document.eventLoop().queueMicrotask([this, weakThis = makeWeakPtr(*this)] {
+            m_document.eventLoop().queueMicrotask([this, weakThis = makeWeakPtr(*weakThis)] {
                 if (weakThis)
                     enableTemporaryTimeUserGesture();
             });
@@ -197,7 +197,7 @@
         }
 
         if (shouldPreserveUserGesture) {
-            m_document.eventLoop().queueMicrotask([this, weakThis = makeWeakPtr(*this)] {
+            m_document.eventLoop().queueMicrotask([this, weakThis = makeWeakPtr(*weakThis)] {
                 if (weakThis)
                     consumeTemporaryTimeUserGesture();
             });
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to