WebKit Bugzilla
Attachment 356529 Details for
Bug 192376
: Update ServiceWorkerContainer::getRegistration lambdas
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192376-20181204135653.patch (text/plain), 4.87 KB, created by
youenn fablet
on 2018-12-04 13:56:53 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2018-12-04 13:56:53 PST
Size:
4.87 KB
patch
obsolete
>Subversion Revision: 238855 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index c630a52e47dd388f3bbf313536d0a259b1459a29..35f323aa6b13190b7e70fde72093e392b3a5094b 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2018-12-04 Youenn Fablet <youenn@apple.com> >+ >+ Update ServiceWorkerContainer::getRegistration lambdas >+ https://bugs.webkit.org/show_bug.cgi?id=192376 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ There is no need to pass 'this' in lambdas as the last lambda >+ takes a ScriptExecutionContext&. >+ No change of behavior. >+ >+ * workers/service/ServiceWorkerContainer.cpp: >+ (WebCore::ServiceWorkerContainer::getRegistration): >+ (WebCore::ServiceWorkerContainer::getRegistrations): >+ > 2018-12-04 Youenn Fablet <youenn@apple.com> > > Fix MediaRecorder flaky tests >diff --git a/Source/WebCore/workers/service/ServiceWorkerContainer.cpp b/Source/WebCore/workers/service/ServiceWorkerContainer.cpp >index 969bd20ad50d598766bb1c4ec8e180688251ea54..0ef9bf3503135101fac5f9fad959387eab91a27f 100644 >--- a/Source/WebCore/workers/service/ServiceWorkerContainer.cpp >+++ b/Source/WebCore/workers/service/ServiceWorkerContainer.cpp >@@ -269,10 +269,16 @@ void ServiceWorkerContainer::getRegistration(const String& clientURL, Ref<Deferr > m_pendingPromises.add(pendingPromiseIdentifier, WTFMove(pendingPromise)); > > auto contextIdentifier = this->contextIdentifier(); >- callOnMainThread([connection = makeRef(ensureSWClientConnection()), this, topOrigin = context->topOrigin().data().isolatedCopy(), parsedURL = parsedURL.isolatedCopy(), contextIdentifier, pendingPromiseIdentifier]() mutable { >- connection->matchRegistration(WTFMove(topOrigin), parsedURL, [this, contextIdentifier, pendingPromiseIdentifier] (auto&& result) mutable { >- ScriptExecutionContext::postTaskTo(contextIdentifier, [this, pendingPromiseIdentifier, result = crossThreadCopy(result)](ScriptExecutionContext&) mutable { >- this->didFinishGetRegistrationRequest(pendingPromiseIdentifier, WTFMove(result)); >+ callOnMainThread([connection = makeRef(ensureSWClientConnection()), topOrigin = context->topOrigin().data().isolatedCopy(), parsedURL = parsedURL.isolatedCopy(), contextIdentifier, pendingPromiseIdentifier]() mutable { >+ connection->matchRegistration(WTFMove(topOrigin), parsedURL, [contextIdentifier, pendingPromiseIdentifier] (auto&& result) mutable { >+ ScriptExecutionContext::postTaskTo(contextIdentifier, [pendingPromiseIdentifier, result = crossThreadCopy(result)](auto& context) mutable { >+ auto* serviceWorkerContainer = context.serviceWorkerContainer(); >+ if (!serviceWorkerContainer) >+ return; >+ if (serviceWorkerContainer->m_isStopped || !context.sessionID().isValid()) >+ return; >+ >+ serviceWorkerContainer->didFinishGetRegistrationRequest(pendingPromiseIdentifier, WTFMove(result)); > }); > }); > }); >@@ -332,10 +338,16 @@ void ServiceWorkerContainer::getRegistrations(Ref<DeferredPromise>&& promise) > > auto contextIdentifier = this->contextIdentifier(); > auto contextURL = context->url(); >- callOnMainThread([connection = makeRef(ensureSWClientConnection()), this, topOrigin = context->topOrigin().data().isolatedCopy(), contextURL = contextURL.isolatedCopy(), contextIdentifier, pendingPromiseIdentifier]() mutable { >- connection->getRegistrations(WTFMove(topOrigin), contextURL, [this, contextIdentifier, pendingPromiseIdentifier] (auto&& registrationDatas) mutable { >- ScriptExecutionContext::postTaskTo(contextIdentifier, [this, pendingPromiseIdentifier, registrationDatas = crossThreadCopy(registrationDatas)](ScriptExecutionContext&) mutable { >- this->didFinishGetRegistrationsRequest(pendingPromiseIdentifier, WTFMove(registrationDatas)); >+ callOnMainThread([connection = makeRef(ensureSWClientConnection()), topOrigin = context->topOrigin().data().isolatedCopy(), contextURL = contextURL.isolatedCopy(), contextIdentifier, pendingPromiseIdentifier]() mutable { >+ connection->getRegistrations(WTFMove(topOrigin), contextURL, [contextIdentifier, pendingPromiseIdentifier] (auto&& registrationDatas) mutable { >+ ScriptExecutionContext::postTaskTo(contextIdentifier, [pendingPromiseIdentifier, registrationDatas = crossThreadCopy(registrationDatas)](auto& context) mutable { >+ auto* serviceWorkerContainer = context.serviceWorkerContainer(); >+ if (!serviceWorkerContainer) >+ return; >+ if (serviceWorkerContainer->m_isStopped || !context.sessionID().isValid()) >+ return; >+ >+ serviceWorkerContainer->didFinishGetRegistrationsRequest(pendingPromiseIdentifier, WTFMove(registrationDatas)); > }); > }); > });
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192376
: 356529