[Webkit-unassigned] [Bug 275286] REGRESSION(279805 at main): [Win] ASSERTION FAILED: m_activeConnections.contains(connection) in CacheStorageManager::unlockStorage(IPC::Connection::UniqueID)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 7 19:33:15 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=275286

Fujii Hironori <Hironori.Fujii at sony.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |youennf at gmail.com

--- Comment #1 from Fujii Hironori <Hironori.Fujii at sony.com> ---
The assertion fails because CacheStorageManager::unlockStorage  is called without calling CacheStorageManager::lockStorage.

CacheStorageManager::lockStorage isn't called because m_connection is empty in WebCacheStorageConnection::lockStorage.
Here is the callstack.

> WebKit2.dll!WebKit::WebCacheStorageConnection::lockStorage(const WebCore::ClientOrigin & origin) Line 122	C++
> WebCore.dll!WebCore::ConnectionStorageLock::ConnectionStorageLock(WTF::Ref<WebCore::CacheStorageConnection,WTF::RawPtrTraits<WebCore::CacheStorageConnection>,WTF::DefaultRefDerefTraits<WebCore::CacheStorageConnection>> && connection, const WebCore::ClientOrigin & origin) Line 160	C++
> [External Code]	
> WebCore.dll!WTF::makeUnique<WebCore::ConnectionStorageLock,WTF::Ref<WebCore::CacheStorageConnection,WTF::RawPtrTraits<WebCore::CacheStorageConnection>,WTF::DefaultRefDerefTraits<WebCore::CacheStorageConnection>>,WebCore::ClientOrigin &>(WTF::Ref<WebCore::CacheStorageConnection,WTF::RawPtrTraits<WebCore::CacheStorageConnection>,WTF::DefaultRefDerefTraits<WebCore::CacheStorageConnection>> && args, WebCore::ClientOrigin & args) Line 613	C++
> WebCore.dll!WebCore::DOMCacheStorage::retrieveCaches(WTF::CompletionHandler<void (std::optional<WebCore::Exception> &&)> && callback) Line 181	C++
> WebCore.dll!WebCore::DOMCacheStorage::has(const WTF::String & name, WebCore::DOMPromiseDeferred<WebCore::IDLBoolean> && promise) Line 135	C++
> WebCore.dll!WebCore::jsDOMCacheStoragePrototypeFunction_hasBody::<lambda>() Line 229	C++
> WebCore.dll!WebCore::toJSNewlyCreated<WebCore::IDLPromise<WebCore::IDLBoolean>,`lambda at C:\webkit\wc\WebKitBuild\Debug\WebCore\DerivedSources\JSDOMCacheStorage.cpp:229:5'>(JSC::JSGlobalObject & lexicalGlobalObject, WebCore::JSDOMGlobalObject & globalObject, JSC::ThrowScope & throwScope, WebCore::jsDOMCacheStoragePrototypeFunction_hasBody::std::optional<WTF::RefPtr<WebCore::DOMMimeType,WTF::RawPtrTraits<WebCore::DOMMimeType>,WTF::DefaultRefDerefTraits<WebCore::DOMMimeType>>> <lambda>(WebCore::JSDOMMimeTypeArray &, JSC::PropertyName) && valueOrFunctor) Line 235	C++
> WebCore.dll!WebCore::jsDOMCacheStoragePrototypeFunction_hasBody(JSC::JSGlobalObject * lexicalGlobalObject, JSC::CallFrame * callFrame, WebCore::JSDOMCacheStorage * castedThis, WTF::Ref<WebCore::DeferredPromise,WTF::RawPtrTraits<WebCore::DeferredPromise>,WTF::DefaultRefDerefTraits<WebCore::DeferredPromise>> && promise) Line 229	C++
> WebCore.dll!WebCore::IDLOperationReturningPromise<WebCore::JSDOMCacheStorage>::call<&WebCore::jsDOMCacheStoragePrototypeFunction_hasBody,2>::<lambda>(JSC::JSGlobalObject & lexicalGlobalObject, JSC::CallFrame & callFrame, WTF::Ref<WebCore::DeferredPromise,WTF::RawPtrTraits<WebCore::DeferredPromise>,WTF::DefaultRefDerefTraits<WebCore::DeferredPromise>> && promise) Line 54	C++
> WebCore.dll!WebCore::callPromiseFunction<`lambda at C:\webkit\wc\Source\WebCore\bindings\js\JSDOMOperationReturningPromise.h:41:89'>(JSC::JSGlobalObject & lexicalGlobalObject, JSC::CallFrame & callFrame, WebCore::IDLOperationReturningPromise<WebCore::JSDOMCacheStorage>::call<&WebCore::jsDOMCacheStoragePrototypeFunction_hasBody,2>::std::optional<WTF::RefPtr<WebCore::DOMMimeType,WTF::RawPtrTraits<WebCore::DOMMimeType>,WTF::DefaultRefDerefTraits<WebCore::DOMMimeType>>> <lambda>(WebCore::JSDOMMimeTypeArray &, JSC::PropertyName) functor) Line 382	C++
> WebCore.dll!WebCore::IDLOperationReturningPromise<WebCore::JSDOMCacheStorage>::call<&WebCore::jsDOMCacheStoragePrototypeFunction_hasBody,2>(JSC::JSGlobalObject & lexicalGlobalObject, JSC::CallFrame & callFrame, const char * operationName) Line 41	C++
> WebCore.dll!WebCore::jsDOMCacheStoragePrototypeFunction_has(JSC::JSGlobalObject * lexicalGlobalObject, JSC::CallFrame * callFrame) Line 234	C++
> [External Code]	

In DOMCacheStorage::retrieveCaches, there is the following line.

> scriptExecutionContext()->enqueueTaskWhenSettled(m_connection->retrieveCaches(*origin, m_updateCounter), TaskSource::DOMManipulation, [this, callback = WTFMove(callback), pendingActivity = makePendingActivity(*this), connectionStorageLock = makeUnique<ConnectionStorageLock>(m_connection.copyRef(), *origin)] (auto&& result) mutable {

makeUnique<ConnectionStorageLock>(...) is called before m_connection->retrieveCaches(...) is called.
This is the reason why m_connection is empty.

m_connection->retrieveCaches(...) has to be called before makeUnique<ConnectionStorageLock>(...).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240608/db3b90ab/attachment-0001.htm>


More information about the webkit-unassigned mailing list