[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#25816: Emacs xwidget GC issue with callback
From: |
Andreas Schwab |
Subject: |
bug#25816: Emacs xwidget GC issue with callback |
Date: |
Mon, 20 Feb 2017 19:01:51 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
On Feb 20 2017, Paul Eggert <eggert@cs.ucla.edu> wrote:
> @@ -714,8 +717,13 @@ argument procedure FUN.*/)
> if (!NILP (fun) && !FUNCTIONP (fun))
> wrong_type_argument (Qinvalid_function, fun);
>
> - void *callback = (FUNCTIONP (fun)) ?
> - &webkit_javascript_finished_cb : NULL;
> + GAsyncReadyCallback callback
> + = FUNCTIONP (fun) ? webkit_javascript_finished_cb : NULL;
> +
> + /* FIXME: This hack might lead to disaster if FUN is garbage
> + collected before store_xwidget_js_callback_event makes it visible
> + to Lisp again. See the FIXME in webkit_javascript_finished_cb. */
> + gpointer callback_arg = (gpointer) (intptr_t) XLI (fun);
When --with-wide-int, EMACS_INT may be wider than a pointer, and this
discards the type bits.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."