Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0125fbadd4953c2a69f4f2baf92eaf4b20723008
https://github.com/WebKit/WebKit/commit/0125fbadd4953c2a69f4f2baf92eaf4b20723008
Author: Abrar Rahman Protyasha <[email protected]>
Date: 2026-04-02 (Thu, 02 Apr 2026)
Changed paths:
M Source/WebCore/inspector/agents/InspectorIndexedDBAgent.cpp
Log Message:
-----------
IndexedDB inspection can silently fail when document has no IDB factory
https://bugs.webkit.org/show_bug.cgi?id=311364
rdar://173963020
Reviewed by Megan Gardner and Aditya Keerthi.
In InspectorIndexedDBAgent.cpp, `IDBFactoryFromDocument()` constructs an
error via `makeUnexpected(...)` when `idbFactory` is null, but fails to
actually return it.
This means the error is silently discarded and execution falls through to
the next line, which returns a null idbFactory as a success value.
As a result, when a document has no IndexedDB factory, instead of
propagating a descriptive error back to the Inspector frontend, the agent
returns a null pointer wrapped in a success result, which could cause a
null dereference in callers or silently break IndexedDB inspection.
We discovered this bug during the migration to std::unexpected, because
the standard analogue of that type has a nodiscard constructor.
* Source/WebCore/inspector/agents/InspectorIndexedDBAgent.cpp:
(WebCore::IDBFactoryFromDocument):
Canonical link: https://commits.webkit.org/310488@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications