From e04db5efed723b67b84568ab738d5764e16db9d2 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Mon, 12 Sep 2022 16:25:41 -0400 Subject: Ladybird: Hook up the dump-cookies debug request to the cookie jar --- Ladybird/WebView.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Ladybird/WebView.cpp b/Ladybird/WebView.cpp index e881fcc54e..93f5fc9a48 100644 --- a/Ladybird/WebView.cpp +++ b/Ladybird/WebView.cpp @@ -324,6 +324,11 @@ public: m_cookie_jar.set_cookie(url, cookie, source); } + void dump_cookies() const + { + m_cookie_jar.dump_cookies(); + } + void request_file(NonnullRefPtr& request) override { auto const file = Core::System::open(request->path(), O_RDONLY); @@ -923,6 +928,9 @@ void WebView::debug_request(String const& request, String const& argument) if (auto* doc = page.top_level_browsing_context().active_document()) doc->window().local_storage()->dump(); } + + if (request == "dump-cookies"sv) + m_page_client->dump_cookies(); } String WebView::source() const -- cgit v1.2.3