RESOLVED FIXED311364
IndexedDB inspection can silently fail when document has no IDB factory
https://bugs.webkit.org/show_bug.cgi?id=311364
Summary IndexedDB inspection can silently fail when document has no IDB factory
Abrar Rahman Protyasha
Reported 2026-04-02 14:06:17 PDT
I discovered this bug when migrating from WTF::Unexpected to std::unexpected in https://github.com/WebKit/WebKit/pull/61900 -- refer to this specific EWS run: https://ews-build.webkit.org/#/builders/59/builds/107329. 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.
Attachments
Radar WebKit Bug Importer
Comment 1 2026-04-02 14:06:23 PDT
Abrar Rahman Protyasha
Comment 2 2026-04-02 14:10:18 PDT
EWS
Comment 3 2026-04-02 18:41:17 PDT
Committed 310488@main (0125fbadd495): <https://commits.webkit.org/310488@main> Reviewed commits have been landed. Closing PR #61929 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.