⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 252726 in webkit


Ignore:
Timestamp:
Nov 20, 2019, 8:34:19 PM (7 years ago)
Author:
Fujii Hironori
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'.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r252724 r252726  
     12019-11-20  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [MSVC] error C2039: 'weakPtrFactory': is not a member of 'WebCore::DocumentStorageAccess::requestStorageAccess::<lambda_3f2cfd7704f93d8fe19d5b5f064f8add>'
     4        https://bugs.webkit.org/show_bug.cgi?id=204437
     5
     6        Unreviewed build fix.
     7
     8        MSVC has a bug of a outer lambda's captured 'this' can't be used as
     9        a lambda capture initializer of a inner lambda.
     10
     11        * dom/DocumentStorageAccess.cpp:
     12        (WebCore::DocumentStorageAccess::requestStorageAccess): Replaced '*this' in the lambda capture initializer with '*weakThis'.
     13
    1142019-11-20  Simon Fraser  <simon.fraser@apple.com>
    215
  • trunk/Source/WebCore/dom/DocumentStorageAccess.cpp

    r252723 r252726  
    183183
    184184        if (shouldPreserveUserGesture) {
    185             m_document.eventLoop().queueMicrotask([this, weakThis = makeWeakPtr(*this)] {
     185            m_document.eventLoop().queueMicrotask([this, weakThis = makeWeakPtr(*weakThis)] {
    186186                if (weakThis)
    187187                    enableTemporaryTimeUserGesture();
     
    198198
    199199        if (shouldPreserveUserGesture) {
    200             m_document.eventLoop().queueMicrotask([this, weakThis = makeWeakPtr(*this)] {
     200            m_document.eventLoop().queueMicrotask([this, weakThis = makeWeakPtr(*weakThis)] {
    201201                if (weakThis)
    202202                    consumeTemporaryTimeUserGesture();
Note: See TracChangeset for help on using the changeset viewer.