diff options
author | Timothy Flynn <trflynn89@pm.me> | 2022-09-12 16:25:41 -0400 |
---|---|---|
committer | Andrew Kaster <andrewdkaster@gmail.com> | 2022-12-25 07:58:58 -0700 |
commit | e04db5efed723b67b84568ab738d5764e16db9d2 (patch) | |
tree | 00a51c0decf95d9ffe7c68a0cfe5fe5d061b83c9 | |
parent | 0f1644f62d4d7e2e11091a8b32a83eb4f2aa9775 (diff) | |
download | serenity-e04db5efed723b67b84568ab738d5764e16db9d2.zip |
Ladybird: Hook up the dump-cookies debug request to the cookie jar
-rw-r--r-- | Ladybird/WebView.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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<Web::FileRequest>& 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 |