After the WPT re-sync in https://trac.webkit.org/changeset/269214/webkit, imported/w3c/web-platform-tests/html/dom/idlharness.worker.html has been consistently failing an assertion on iOS and macOS debug bots. https://results.webkit.org/?suite=layout-tests&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fdom%2Fidlharness.worker.html stderr from test: ERROR: WebSocket network error: The operation couldn’t be completed. (kCFErrorDomainCFNetwork error 2.) ./Modules/websockets/WebSocketChannel.cpp(365) : virtual void WebCore::WebSocketChannel::didFailSocketStream(WebCore::SocketStreamHandle &, const WebCore::SocketStreamError &) ERROR: WebSocket network error: The operation couldn’t be completed. (kCFErrorDomainCFNetwork error 2.) ./Modules/websockets/WebSocketChannel.cpp(365) : virtual void WebCore::WebSocketChannel::didFailSocketStream(WebCore::SocketStreamHandle &, const WebCore::SocketStreamError &) CONSOLE MESSAGE: WebSocket network error: The operation couldn’t be completed. (kCFErrorDomainCFNetwork error 2.) CONSOLE MESSAGE: WebSocket network error: The operation couldn’t be completed. (kCFErrorDomainCFNetwork error 2.) ASSERTION FAILED: m_state == CLOSED ./page/EventSource.cpp(289) : void WebCore::EventSource::abortConnectionAttempt() 1 0x5e736df89 WTFCrash 2 0x5c65e65eb WTFCrashWithInfo(int, char const*, char const*, int) 3 0x5ca5f04da WebCore::EventSource::abortConnectionAttempt() 4 0x5ca5f02a9 WebCore::EventSource::didFail(WebCore::ResourceError const&) 5 0x5ca4701ec WebCore::ThreadableLoaderClientWrapper::didFail(WebCore::ResourceError const&) 6 0x5ca493416 WebCore::WorkerThreadableLoader::MainThreadBridge::didFail(WebCore::ResourceError const&)::$_18::operator()(WebCore::ScriptExecutionContext&) 7 0x5ca493273 WTF::Detail::CallableWrapper<WebCore::WorkerThreadableLoader::MainThreadBridge::didFail(WebCore::ResourceError const&)::$_18, void, WebCore::ScriptExecutionContext&>::call(WebCore::ScriptExecutionContext&) 8 0x5c8e9445a WTF::Function<void (WebCore::ScriptExecutionContext&)>::operator()(WebCore::ScriptExecutionContext&) const 9 0x5c8e8575d WebCore::ScriptExecutionContext::Task::performTask(WebCore::ScriptExecutionContext&) 10 0x5cb8413a0 WebCore::WorkerRunLoop::Task::performTask(WebCore::WorkerOrWorkletGlobalScope*) 11 0x5cb840897 WebCore::WorkerRunLoop::runInMode(WebCore::WorkerOrWorkletGlobalScope*, WebCore::ModePredicate const&, WebCore::WorkerRunLoop::WaitMode) 12 0x5cb83f8b8 WebCore::WorkerRunLoop::run(WebCore::WorkerOrWorkletGlobalScope*) 13 0x5cb83f858 WebCore::WorkerOrWorkletThread::runEventLoop() 14 0x5cb81a634 WebCore::DedicatedWorkerThread::runEventLoop() 15 0x5cb83fabd WebCore::WorkerOrWorkletThread::workerOrWorkletThread() 16 0x5cb87047b WebCore::WorkerThread::createThread()::$_0::operator()() const 17 0x5cb87042e WTF::Detail::CallableWrapper<WebCore::WorkerThread::createThread()::$_0, void>::call() 18 0x5e7399ca2 WTF::Function<void ()>::operator()() const 19 0x5e745c3a8 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) 20 0x5e746a4e8 WTF::wtfThreadEntryPoint(void*) 21 0x7fff6f2a5109 _pthread_start 22 0x7fff6f2a0b8b thread_start LEAK: 1 WebPageProxy
Created attachment 412962 [details] crash log
<rdar://problem/70963581>
void EventSource::abortConnectionAttempt() { ASSERT(m_state == CONNECTING); RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!m_isSuspendedForBackForwardCache); if (m_requestInFlight) doExplicitLoadCancellation(); else { m_state = CLOSED; unsetPendingActivity(*this); } ASSERT(m_state == CLOSED); // Failing here. dispatchEvent(Event::create(eventNames().errorEvent, Event::CanBubble::No, Event::IsCancelable::No)); }
Created attachment 412971 [details] WIP Patch
*** Bug 218461 has been marked as a duplicate of this bug. ***
Created attachment 412975 [details] WIP Patch
Created attachment 412977 [details] WIP Patch
Created attachment 412983 [details] Patch
Comment on attachment 412983 [details] Patch r=me
Committed r269284: <https://trac.webkit.org/changeset/269284> All reviewed patches have been landed. Closing bug and clearing flags on attachment 412983 [details].