GNU bug report logs -
#25816
Emacs xwidget GC issue with callback
Previous Next
Reported by: Paul Eggert <eggert <at> cs.ucla.edu>
Date: Mon, 20 Feb 2017 17:11:02 UTC
Severity: normal
Merged with 31545
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Feb 20 2017, Paul Eggert <eggert <at> 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 <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
This bug report was last modified 5 years and 75 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.