ServiceWorkerJob::m_lastResponse is unneeded
Created attachment 334405 [details] Patch
This could fix the following crash since m_lastResponse is the only ResourceResponse: Thread 5 Crashed ↩:: WebCore: Worker 0 com.apple.JavaScriptCore 0x00007fff301cd4c0 WTF::StringImpl::~StringImpl() + 80 1 com.apple.JavaScriptCore 0x00007fff301cd45e WTF::StringImpl::destroy(WTF::StringImpl*) + 14 2 com.apple.WebCore 0x00007fff3a8133c8 WebCore::ResourceResponseBase::~ResourceResponseBase() + 184 3 com.apple.WebCore 0x00007fff3bc2f89b WebCore::ServiceWorkerJob::~ServiceWorkerJob() + 59 4 com.apple.WebCore 0x00007fff3bc2f94e WebCore::ServiceWorkerJob::~ServiceWorkerJob() + 14 5 com.apple.WebCore 0x00007fff3bc2d27c WebCore::ServiceWorkerContainer::jobResolvedWithRegistration(WebCore::ServiceWorkerJob&, WebCore::ServiceWorkerRegistrationData&&, WebCore::ShouldNotifyWhenResolved) + 2444 6 com.apple.WebCore 0x00007fff3bc26c98 WTF::Function<void (WebCore::ScriptExecutionContext&)>::CallableWrapper<WebCore::SWClientConnection::postTaskForJob(WTF::ObjectIdentifier<WebCore::ServiceWorkerJobIdentifierType>, WebCore::SWClientConnection::IsJobComplete, WTF::Function<void (WebCore::ServiceWorkerJob&)>&&)::$_2>::call(WebCore::ScriptExecutionContext&) + 72 7 com.apple.WebCore 0x00007fff3bc1cd10 WebCore::WorkerRunLoop::runInMode(WebCore::WorkerGlobalScope*, WebCore::ModePredicate const&, WebCore::WorkerRunLoop::WaitMode) + 416 8 com.apple.WebCore 0x00007fff3bc1cb10 WebCore::WorkerRunLoop::run(WebCore::WorkerGlobalScope*) + 96 9 com.apple.WebCore 0x00007fff3bc1f0d9 WebCore::WorkerThread::workerThread() + 1033 10 com.apple.JavaScriptCore 0x00007fff30db8f44 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 228 11 com.apple.JavaScriptCore 0x00007fff301cdbd9 WTF::wtfThreadEntryPoint(void*) + 9 12 libsystem_pthread.dylib 0x00007fff5597e661 _pthread_body + 340 13 libsystem_pthread.dylib 0x00007fff5597e50d _pthread_start + 377 14 libsystem_pthread.dylib 0x00007fff5597dbf9 thread_start + 13 That said, m_lastResponse is given by a WorkerThreadableLoaderClient callback so the response should already be isolated. Maybe there is a bigger issue and ServiceWorkerJob is not always deleted in the right thread?
Comment on attachment 334405 [details] Patch r=me if the bots are happy.
Comment on attachment 334405 [details] Patch Clearing flags on attachment: 334405 Committed r228895: <https://trac.webkit.org/changeset/228895>
All reviewed patches have been landed. Closing bug.
<rdar://problem/37759608>