[MSVC] Fix compilation errors with lambdas in Service Workers
authordon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Feb 2019 18:23:19 +0000 (18:23 +0000)
committerdon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Feb 2019 18:23:19 +0000 (18:23 +0000)
commitd94f2b5b9afa53e3b2acce55001730b694db19d8
tree9e9151f3f900f976929c2e623017c1a170614af2
parentb505eb84362745e4663c2b7a448903715f0da321
[MSVC] Fix compilation errors with lambdas in Service Workers
https://bugs.webkit.org/show_bug.cgi?id=194841

Reviewed by Alex Christensen.

Source/WebCore:

No new tests. No change in behavior.

MSVC has problems with the scoping of `this` within a nested lambda. In these cases `this` is
referring to the enclosing lambda according to MSVC. This patch works around this behavior
through by using the `protectedThis` pattern in WebKit code.

* workers/service/server/RegistrationDatabase.cpp:
(WebCore::RegistrationDatabase::openSQLiteDatabase):

Source/WebKit:

* WebProcess/Storage/ServiceWorkerClientFetch.cpp:
(WebKit::ServiceWorkerClientFetch::didReceiveRedirectResponse):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/workers/service/server/RegistrationDatabase.cpp
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/Storage/ServiceWorkerClientFetch.cpp