Changeset 228957 in webkit


Ignore:
Timestamp:
Feb 23, 2018 12:30:04 PM (6 years ago)
Author:
jmarcell@apple.com
Message:

Cherry-pick r228931. rdar://problem/37816658

Location:
branches/safari-605-branch/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-605-branch/Source/WebCore/ChangeLog

    r228956 r228957  
     12018-02-23  Jason Marcell  <jmarcell@apple.com>
     2
     3        Cherry-pick r228931. rdar://problem/37816658
     4
     5    2018-02-22  Chris Dumez  <cdumez@apple.com>
     6
     7            ServiceWorkerContainer::startScriptFetchForJob() fails to isolate copy the registrationKey before passing it to the main thread
     8            https://bugs.webkit.org/show_bug.cgi?id=183050
     9            <rdar://problem/37796881>
     10
     11            Reviewed by Youenn Fablet.
     12
     13            Create an isolated copy of the registrationKey before passing it to the main thread in ServiceWorkerContainer's
     14            startScriptFetchForJob() / jobFinishedLoadingScript() / jobFailedLoadingScript().
     15
     16            * workers/service/ServiceWorkerContainer.cpp:
     17            (WebCore::ServiceWorkerContainer::startScriptFetchForJob):
     18            (WebCore::ServiceWorkerContainer::jobFinishedLoadingScript):
     19            (WebCore::ServiceWorkerContainer::jobFailedLoadingScript):
     20
    1212018-02-23  Jason Marcell  <jmarcell@apple.com>
    222
  • branches/safari-605-branch/Source/WebCore/workers/service/ServiceWorkerContainer.cpp

    r228956 r228957  
    488488    if (!context) {
    489489        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()] {
    491491            connection->failedFetchingScript(jobIdentifier, registrationKey, { errorDomainWebKitInternal, 0, scriptURL, ASCIILiteral("Attempt to fetch service worker script with no ScriptExecutionContext") });
    492492        });
     
    506506    CONTAINER_RELEASE_LOG_IF_ALLOWED("jobFinishedLoadingScript: Successfuly finished fetching script for job %llu", job.identifier().toUInt64());
    507507
    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()] {
    509509        connection->finishFetchingScriptInServer({ jobDataIdentifier, registrationKey, script, contentSecurityPolicy, { } });
    510510    });
     
    523523        job.promise()->reject(*exception);
    524524
    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()] {
    526526        connection->failedFetchingScript(jobIdentifier, registrationKey, error);
    527527    });
Note: See TracChangeset for help on using the changeset viewer.