Changeset 252849 in webkit
- Timestamp:
- Nov 25, 2019 1:15:15 AM (4 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r252848 r252849 1 2019-11-25 Youenn Fablet <youenn@apple.com> 2 3 Crash in WebCore::ServiceWorkerRegistrationKey::hash() const 4 https://bugs.webkit.org/show_bug.cgi?id=204497 5 <rdar://problem/57348603> 6 7 Reviewed by Alex Christensen. 8 9 Update ServiceWorkerContainer::jobResolvedWithRegistration to handle the case of a 10 ServiceWorkerContainer that might have a job whose promise is not related to the same context. 11 In that case, the ServiceWorkerContainer might get stopped, thus its m_ongoingSettledRegistrations be cleared. 12 But the promise may get settled shortly after since its context is not stopped and will then retrieve an empty registration data key. 13 This is difficult to test given we do not control when the resolvedWithRegistration task is posted to the client. 14 15 * workers/service/ServiceWorkerContainer.cpp: 16 (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration): 17 * workers/service/ServiceWorkerRegistrationKey.h: 18 (WebCore::ServiceWorkerRegistrationKey::encode const): 19 Add release asserts to make sure we do not store/transfer empty registration keys. 20 1 21 2019-11-25 Youenn Fablet <youenn@apple.com> 2 22 -
trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp
r252848 r252849 393 393 m_ongoingSettledRegistrations.add(++m_lastOngoingSettledRegistrationIdentifier, registration->data().key); 394 394 promise->whenSettled([this, protectedThis = WTFMove(protectedThis), identifier = m_lastOngoingSettledRegistrationIdentifier] { 395 notifyRegistrationIsSettled(m_ongoingSettledRegistrations.take(identifier)); 395 auto iterator = m_ongoingSettledRegistrations.find(identifier); 396 if (iterator == m_ongoingSettledRegistrations.end()) 397 return; 398 notifyRegistrationIsSettled(iterator->value); 399 m_ongoingSettledRegistrations.remove(iterator); 396 400 }); 397 401 } -
trunk/Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h
r247104 r252849 74 74 void ServiceWorkerRegistrationKey::encode(Encoder& encoder) const 75 75 { 76 RELEASE_ASSERT(!m_topOrigin.isEmpty()); 77 RELEASE_ASSERT(!m_scope.isNull()); 76 78 encoder << m_topOrigin << m_scope; 77 79 } -
trunk/Source/WebKit/ChangeLog
r252840 r252849 1 2019-11-25 Youenn Fablet <youenn@apple.com> 2 3 Crash in WebCore::ServiceWorkerRegistrationKey::hash() const 4 https://bugs.webkit.org/show_bug.cgi?id=204497 5 <rdar://problem/57348603> 6 7 Reviewed by Alex Christensen. 8 9 * WebProcess/Storage/WebSWClientConnection.cpp: 10 (WebKit::WebSWClientConnection::scheduleJobInServer): 11 Add a release assert to be able to further debug the crash. 12 1 13 2019-11-23 John Wilander <wilander@apple.com> 2 14 -
trunk/Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp
r251598 r252849 74 74 void WebSWClientConnection::scheduleJobInServer(const ServiceWorkerJobData& jobData) 75 75 { 76 RELEASE_ASSERT(!jobData.scopeURL.isNull()); 76 77 runOrDelayTaskForImport([this, jobData] { 77 78 send(Messages::WebSWServerConnection::ScheduleJobInServer { jobData });
Note: See TracChangeset
for help on using the changeset viewer.