Changeset 228061 in webkit


Ignore:
Timestamp:
Feb 4, 2018 6:18:58 PM (6 years ago)
Author:
jmarcell@apple.com
Message:

Cherry-pick r227967. rdar://problem/37145562

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

Legend:

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

    r228060 r228061  
     12018-02-04  Jason Marcell  <jmarcell@apple.com>
     2
     3        Cherry-pick r227967. rdar://problem/37145562
     4
     5    2018-02-01  Chris Dumez  <cdumez@apple.com>
     6
     7            We no longer need to queue service worker jobs until the connection to the service worker process has been established
     8            https://bugs.webkit.org/show_bug.cgi?id=182375
     9
     10            Reviewed by Youenn Fablet.
     11
     12            We no longer need to queue service worker jobs until the connection to the service worker process
     13            has been established. We initially did this to work around the fact that registrations restored
     14            from disk would not have an active worker until the service worker process had been established.
     15            However, this issue has been fixed in r227696.
     16
     17            This is basically a revert of r227220, which is no longer needed after r227696.
     18
     19            No new tests, initial fix was covered by an API test that still passes.
     20
     21            * workers/service/server/SWServer.cpp:
     22            (WebCore::SWServer::clearAll):
     23            (WebCore::SWServer::clear):
     24            (WebCore::SWServer::scheduleJob):
     25            (WebCore::SWServer::serverToContextConnectionCreated):
     26            * workers/service/server/SWServer.h:
     27
    1282018-02-04  Jason Marcell  <jmarcell@apple.com>
    229
  • branches/safari-605-branch/Source/WebCore/workers/service/server/SWServer.cpp

    r228055 r228061  
    190190    ASSERT(m_registrationsByID.isEmpty());
    191191    m_pendingContextDatas.clear();
    192     m_pendingJobs.clear();
    193192    m_originStore->clearAll();
    194193    m_registrationStore.clearAll(WTFMove(completionHandler));
     
    211210    });
    212211
    213     m_pendingJobs.removeAllMatching([&](auto& job) {
    214         return job.registrationKey().relatesToOrigin(origin);
    215     });
    216 
    217212    // Calling SWServerRegistration::clear() takes care of updating m_registrations, m_originStore and m_registrationStore.
    218213    for (auto* registration : registrationsToRemove)
     
    269264{
    270265    ASSERT(m_connections.contains(jobData.connectionIdentifier()));
    271 
    272     if (!SWServerToContextConnection::globalServerToContextConnection()) {
    273         m_pendingJobs.append(WTFMove(jobData));
    274         return;
    275     }
    276266
    277267    // FIXME: Per the spec, check if this job is equivalent to the last job on the queue.
     
    486476            callback(success, *connection);
    487477    }
    488 
    489     auto pendingJobs = WTFMove(m_pendingJobs);
    490     for (auto& jobData : pendingJobs)
    491         scheduleJob(WTFMove(jobData));
    492478}
    493479
  • branches/safari-605-branch/Source/WebCore/workers/service/server/SWServer.h

    r227828 r228061  
    224224    RegistrationStore m_registrationStore;
    225225    Vector<ServiceWorkerContextData> m_pendingContextDatas;
    226     Vector<ServiceWorkerJobData> m_pendingJobs;
    227226    HashMap<ServiceWorkerIdentifier, Vector<RunServiceWorkerCallback>> m_serviceWorkerRunRequests;
    228227    PAL::SessionID m_sessionID;
Note: See TracChangeset for help on using the changeset viewer.