Changeset 255418 in webkit


Ignore:
Timestamp:
Jan 29, 2020 11:02:25 PM (4 years ago)
Author:
Fujii Hironori
Message:

[MSVC] Add /experimental:newLambdaProcessor switch for better C++ conformance
https://bugs.webkit.org/show_bug.cgi?id=204443

Reviewed by Alex Christensen.

.:

MSVC has a bug of 'this' in lambda captures. It has caused
compilation errors repeatedly.

  • Source/cmake/OptionsMSVC.cmake: Added /experimental:newLambdaProcessor switch.

Source/WebCore:

  • dom/DocumentStorageAccess.cpp:

(WebCore::DocumentStorageAccess::requestStorageAccess): Reverted MSVC workaround of r252726.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r255392 r255418  
     12020-01-29  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [MSVC] Add /experimental:newLambdaProcessor switch for better C++ conformance
     4        https://bugs.webkit.org/show_bug.cgi?id=204443
     5
     6        Reviewed by Alex Christensen.
     7
     8        MSVC has a bug of 'this' in lambda captures. It has caused
     9        compilation errors repeatedly.
     10
     11        * Source/cmake/OptionsMSVC.cmake: Added /experimental:newLambdaProcessor switch.
     12
    1132020-01-29  Stephan Szabo  <stephan.szabo@sony.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r255417 r255418  
     12020-01-29  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [MSVC] Add /experimental:newLambdaProcessor switch for better C++ conformance
     4        https://bugs.webkit.org/show_bug.cgi?id=204443
     5
     6        Reviewed by Alex Christensen.
     7
     8        * dom/DocumentStorageAccess.cpp:
     9        (WebCore::DocumentStorageAccess::requestStorageAccess): Reverted MSVC workaround of r252726.
     10
    1112020-01-29  Eric Carlson  <eric.carlson@apple.com>
    212
  • trunk/Source/WebCore/dom/DocumentStorageAccess.cpp

    r253034 r255418  
    183183
    184184        if (shouldPreserveUserGesture) {
    185             m_document.eventLoop().queueMicrotask([this, weakThis = makeWeakPtr(*weakThis)] {
     185            m_document.eventLoop().queueMicrotask([this, weakThis = makeWeakPtr(*this)] {
    186186                if (weakThis)
    187187                    enableTemporaryTimeUserGesture();
     
    198198
    199199        if (shouldPreserveUserGesture) {
    200             m_document.eventLoop().queueMicrotask([this, weakThis = makeWeakPtr(*weakThis)] {
     200            m_document.eventLoop().queueMicrotask([this, weakThis = makeWeakPtr(*this)] {
    201201                if (weakThis)
    202202                    consumeTemporaryTimeUserGesture();
  • trunk/Source/cmake/OptionsMSVC.cmake

    r253034 r255418  
    2929# Specify the source code encoding
    3030add_compile_options(/utf-8 /validate-charset)
     31
     32# Enable the new lambda processor for better C++ conformance with /std:c++17
     33if (NOT COMPILER_IS_CLANG_CL)
     34    add_compile_options(/experimental:newLambdaProcessor)
     35endif ()
    3136
    3237if (${CMAKE_BUILD_TYPE} MATCHES "Debug")
Note: See TracChangeset for help on using the changeset viewer.