Changeset 228956 in webkit


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

Cherry-pick r228928. rdar://problem/37816673

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

Legend:

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

    r228913 r228956  
     12018-02-23  Jason Marcell  <jmarcell@apple.com>
     2
     3        Cherry-pick r228928. rdar://problem/37816673
     4
     5    2018-02-22  Chris Dumez  <cdumez@apple.com>
     6
     7            ServiceWorkerContainer::scheduleJob() fails to isolate copy the jobData before passing it to the main thread
     8            https://bugs.webkit.org/show_bug.cgi?id=183046
     9            <rdar://problem/37793395>
     10
     11            Reviewed by Youenn Fablet.
     12
     13            Make sure we isolate copy the jobData before passing it to the main thread in ServiceWorkerContainer::scheduleJob().
     14            The jobData contains Strings / URLs so it is not safe to have non-isolated copies of it on various threads.
     15
     16            * workers/service/ServiceWorkerContainer.cpp:
     17            (WebCore::ServiceWorkerContainer::scheduleJob):
     18
    1192018-02-21  Jason Marcell  <jmarcell@apple.com>
    220
  • branches/safari-605-branch/Source/WebCore/workers/service/ServiceWorkerContainer.cpp

    r228160 r228956  
    239239    setPendingActivity(this);
    240240
    241     auto jobData = job->data();
     241    auto& jobData = job->data();
    242242    auto result = m_jobMap.add(job->identifier(), WTFMove(job));
    243243    ASSERT_UNUSED(result, result.isNewEntry);
    244244
    245     callOnMainThread([connection = m_swConnection, contextIdentifier = this->contextIdentifier(), jobData = WTFMove(jobData)] {
     245    callOnMainThread([connection = m_swConnection, contextIdentifier = this->contextIdentifier(), jobData = jobData.isolatedCopy()] {
    246246        connection->scheduleJob(contextIdentifier, jobData);
    247247    });
Note: See TracChangeset for help on using the changeset viewer.