[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: shr using `make-xwidget' incorrectly

From: Eli Zaretskii
Subject: Re: shr using `make-xwidget' incorrectly
Date: Thu, 11 Nov 2021 10:01:58 +0200

> From: Po Lu <luangruo@yahoo.com>
> Cc: larsi@gnus.org,  emacs-devel@gnu.org
> Date: Thu, 11 Nov 2021 15:05:19 +0800
> Eli Zaretskii <eliz@gnu.org> writes:
> >> I think the best thing to do in this case would be to introduce a
> >> `dead' state for xwidgets, not unlike killed buffers and dead frames,
> >> which an xwidget is set to after being killed.
> >> 
> >> Then, performing any sort of operation on a killed xwidget can either
> >> throw an error, or do nothing.
> > Why can't we release the GTK resources when such a buffer is killed?
> We are releasing the GTK resources when such a buffer is killed.  This
> is the problem here: code that uses `CHECK_XWIDGET' won't catch the case
> where the GTK resources are released, but there are still references to
> the xwidget, which causes use-after-frees when trying to redisplay the
> xwidget, or when calling, say, `xwidget-webkit-goto-uri' on the xwidget.

Isn't there some indication in the xwidget that its GTK resources were
freed?  If not, can we add such an indication and set it when we free
those resources?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]