LibWeb: Stub CacheStorage interface

With this change we can again open login form https://discord.com/login
instead of failing in js because `caches.open()` is not defined.
This commit is contained in:
Aliaksandr Kalenik 2025-06-05 17:50:08 +02:00 committed by Alexander Kalenik
commit 7efdd1c1ec
Notes: github-actions[bot] 2025-06-05 21:03:31 +00:00
10 changed files with 102 additions and 0 deletions

View file

@ -18,6 +18,7 @@
#include <LibWeb/HTML/ImageBitmap.h>
#include <LibWeb/PerformanceTimeline/PerformanceEntry.h>
#include <LibWeb/PerformanceTimeline/PerformanceEntryTuple.h>
#include <LibWeb/ServiceWorker/CacheStorage.h>
#include <LibWeb/WebSockets/WebSocket.h>
namespace Web::HTML {
@ -100,6 +101,8 @@ public:
[[nodiscard]] GC::Ref<Crypto::Crypto> crypto();
[[nodiscard]] GC::Ref<ServiceWorker::CacheStorage> caches();
protected:
void initialize(JS::Realm&);
void visit_edges(JS::Cell::Visitor&);
@ -146,6 +149,8 @@ private:
GC::Ptr<Crypto::Crypto> m_crypto;
GC::Ptr<ServiceWorker::CacheStorage> m_cache_storage;
bool m_error_reporting_mode { false };
WebSockets::WebSocket::List m_registered_web_sockets;