Skip to content

Commit

Permalink
renderer/gtk: Fix cookies handling.
Browse files Browse the repository at this point in the history
Bug introduced by mistake in c3e5d89.

Fixes #3550.
  • Loading branch information
aadcg committed Jan 2, 2025
1 parent f371fd0 commit 0d89cf9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion source/renderer/gtk.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,10 @@ the renderer thread, use `defmethod' instead."
(:documentation "WebKit download class."))

(defun make-context ()
(let ((context (make-instance 'webkit:webkit-web-context)))
(let* ((context (make-instance 'webkit:webkit-web-context
:website-data-manager
(make-instance 'webkit-website-data-manager)))
(cookie-manager (webkit:webkit-web-context-get-cookie-manager context)))
(webkit:webkit-web-context-set-spell-checking-enabled context t)
;; Need to set the initial language list.
(let ((pointer (cffi:foreign-alloc :string
Expand All @@ -254,6 +257,12 @@ the renderer thread, use `defmethod' instead."
:callback (first callbacks)
:error-callback (second callbacks))))
nyxt::*schemes*)
(webkit:webkit-cookie-manager-set-persistent-storage
cookie-manager
(uiop:native-namestring (files:expand (make-instance 'nyxt-data-directory
:base-path "cookies")))
:webkit-cookie-persistent-storage-text)
(setf (ffi-buffer-cookie-policy cookie-manager) (default-cookie-policy *browser*))
context))

(define-class gtk-request-data ()
Expand Down

0 comments on commit 0d89cf9

Please sign in to comment.