Changeset 241820 in webkit
- Timestamp:
- Feb 20, 2019 10:23:19 AM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r241790 r241820 1 2019-02-20 Don Olmstead <don.olmstead@sony.com> 2 3 [MSVC] Fix compilation errors with lambdas in Service Workers 4 https://bugs.webkit.org/show_bug.cgi?id=194841 5 6 Reviewed by Alex Christensen. 7 8 No new tests. No change in behavior. 9 10 MSVC has problems with the scoping of `this` within a nested lambda. In these cases `this` is 11 referring to the enclosing lambda according to MSVC. This patch works around this behavior 12 through by using the `protectedThis` pattern in WebKit code. 13 14 * workers/service/server/RegistrationDatabase.cpp: 15 (WebCore::RegistrationDatabase::openSQLiteDatabase): 16 1 17 2019-02-20 Adrian Perez de Castro <aperez@igalia.com> 2 18 -
trunk/Source/WebCore/workers/service/server/RegistrationDatabase.cpp
r241244 r241820 134 134 135 135 String errorMessage; 136 auto scopeExit = makeScopeExit([ &, errorMessage = &errorMessage] {136 auto scopeExit = makeScopeExit([this, protectedThis = makeRef(*this), errorMessage = &errorMessage] { 137 137 ASSERT_UNUSED(errorMessage, !errorMessage->isNull()); 138 138 … … 144 144 145 145 m_database = nullptr; 146 callOnMainThread([protectedThis = makeRef(*this)] {146 callOnMainThread([protectedThis = protectedThis.copyRef()] { 147 147 protectedThis->databaseFailedToOpen(); 148 148 }); -
trunk/Source/WebKit/ChangeLog
r241817 r241820 1 2019-02-20 Don Olmstead <don.olmstead@sony.com> 2 3 [MSVC] Fix compilation errors with lambdas in Service Workers 4 https://bugs.webkit.org/show_bug.cgi?id=194841 5 6 Reviewed by Alex Christensen. 7 8 * WebProcess/Storage/ServiceWorkerClientFetch.cpp: 9 (WebKit::ServiceWorkerClientFetch::didReceiveRedirectResponse): 10 1 11 2019-02-20 Carlos Garcia Campos <cgarcia@igalia.com> 2 12 -
trunk/Source/WebKit/WebProcess/Storage/ServiceWorkerClientFetch.cpp
r241603 r241820 116 116 response.setSource(ResourceResponse::Source::ServiceWorker); 117 117 118 m_loader->willSendRequest(m_loader->request().redirectedRequest(response, m_shouldClearReferrerOnHTTPSToHTTPRedirect), response, [ protectedThis = makeRef(*this), this](ResourceRequest&& request) {118 m_loader->willSendRequest(m_loader->request().redirectedRequest(response, m_shouldClearReferrerOnHTTPSToHTTPRedirect), response, [this, protectedThis = protectedThis.copyRef()](ResourceRequest&& request) { 119 119 if (!m_loader || request.isNull()) { 120 120 if (auto callback = WTFMove(m_callback))
Note: See TracChangeset
for help on using the changeset viewer.