Changeset 228931 in webkit
- Timestamp:
- Feb 22, 2018 1:40:38 PM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r228928 r228931 1 2018-02-22 Chris Dumez <cdumez@apple.com> 2 3 ServiceWorkerContainer::startScriptFetchForJob() fails to isolate copy the registrationKey before passing it to the main thread 4 https://bugs.webkit.org/show_bug.cgi?id=183050 5 <rdar://problem/37796881> 6 7 Reviewed by Youenn Fablet. 8 9 Create an isolated copy of the registrationKey before passing it to the main thread in ServiceWorkerContainer's 10 startScriptFetchForJob() / jobFinishedLoadingScript() / jobFailedLoadingScript(). 11 12 * workers/service/ServiceWorkerContainer.cpp: 13 (WebCore::ServiceWorkerContainer::startScriptFetchForJob): 14 (WebCore::ServiceWorkerContainer::jobFinishedLoadingScript): 15 (WebCore::ServiceWorkerContainer::jobFailedLoadingScript): 16 1 17 2018-02-22 Chris Dumez <cdumez@apple.com> 2 18 -
trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp
r228928 r228931 488 488 if (!context) { 489 489 LOG_ERROR("ServiceWorkerContainer::jobResolvedWithRegistration called but the container's ScriptExecutionContext is gone"); 490 callOnMainThread([connection = m_swConnection, jobIdentifier = job.identifier(), registrationKey = job.data().registrationKey() , scriptURL = job.data().scriptURL.isolatedCopy()] {490 callOnMainThread([connection = m_swConnection, jobIdentifier = job.identifier(), registrationKey = job.data().registrationKey().isolatedCopy(), scriptURL = job.data().scriptURL.isolatedCopy()] { 491 491 connection->failedFetchingScript(jobIdentifier, registrationKey, { errorDomainWebKitInternal, 0, scriptURL, ASCIILiteral("Attempt to fetch service worker script with no ScriptExecutionContext") }); 492 492 }); … … 506 506 CONTAINER_RELEASE_LOG_IF_ALLOWED("jobFinishedLoadingScript: Successfuly finished fetching script for job %llu", job.identifier().toUInt64()); 507 507 508 callOnMainThread([connection = m_swConnection, jobDataIdentifier = job.data().identifier(), registrationKey = job.data().registrationKey() , script = script.isolatedCopy(), contentSecurityPolicy = contentSecurityPolicy.isolatedCopy()] {508 callOnMainThread([connection = m_swConnection, jobDataIdentifier = job.data().identifier(), registrationKey = job.data().registrationKey().isolatedCopy(), script = script.isolatedCopy(), contentSecurityPolicy = contentSecurityPolicy.isolatedCopy()] { 509 509 connection->finishFetchingScriptInServer({ jobDataIdentifier, registrationKey, script, contentSecurityPolicy, { } }); 510 510 }); … … 523 523 job.promise()->reject(*exception); 524 524 525 callOnMainThread([connection = m_swConnection, jobIdentifier = job.identifier(), registrationKey = job.data().registrationKey() , error = error.isolatedCopy()] {525 callOnMainThread([connection = m_swConnection, jobIdentifier = job.identifier(), registrationKey = job.data().registrationKey().isolatedCopy(), error = error.isolatedCopy()] { 526 526 connection->failedFetchingScript(jobIdentifier, registrationKey, error); 527 527 });
Note: See TracChangeset
for help on using the changeset viewer.