From: Qiantan Hong <qthong@stanford.edu>
To: Po Lu <luangruo@yahoo.com>
Cc: Andrew De Angelis <bobodeangelis@gmail.com>,
"emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re: [PATCH] Add user content APIs for WebKit Xwidgets
Date: Sun, 23 Oct 2022 22:16:39 +0000 [thread overview]
Message-ID: <392D5A0E-AC2D-4582-8B81-777CB7C85D7A@stanford.edu> (raw)
In-Reply-To: <874jvu6c3h.fsf@yahoo.com>
>> 1. I think that connecting signal to scriptor (now called manager)
>> doesn't require xw to be marked, because it is also destroyed when xw
>> is killed? Suppose that now I reference count correctly, manager
>> should be owned by xw, just like the WebKitWebContext at line 363.
>
> No, because webkit_web_view_new_with_related_view is used to create
> WebKitWebView objects when an existing live xwidget is specified as the
> related argument to `make-xwidget', and those will hold further
> references to the content manager beyond the lifetime of the
> WebKitWebView holding the initial reference to said content manager. In
> fact, won't userscripts apply to every WebKitWebView with the same
> content manager?
>
> I think I would prefer documenting and implementing userscripts as
> applying to all related xwidgets: you could link each related xwidget
> onto a circular queue, designate one as the "head", and hold a reference
> to the head, replacing it with a different xwidget on the queue each
> time the head is killed, until there are no more xwidgets on that queue,
> at which point it becomes safe to free the userscript data.
Applying to all related Xwidgets sound like a good idea. I think we should
formalize the "group of related Xwidgets" as some kind of object? Maybe
a record type implemented in Lisp, or a pseudo vector (which I don't know
much about how to implement). An alternative is to expose content manager
as a pseudovector, which will in fact have 1-to-1 correspondence with "related
group", but I like related group more because it feels like a nicer abstraction.
What do you think?
If that is implemented I believe we also don't need extra marking, as the
manager will hold a reference to the related group object, but the related
group object will be collected only all related xwdigets are already killed.
Best,
Qiantan
next prev parent reply other threads:[~2022-10-23 22:16 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-14 6:34 [PATCH] Add user content APIs for WebKit Xwidgets Qiantan Hong
2022-10-14 7:01 ` Po Lu
2022-10-14 7:12 ` Qiantan Hong
2022-10-14 7:35 ` Po Lu
2022-10-14 21:13 ` Qiantan Hong
2022-10-15 1:37 ` Qiantan Hong
2022-10-15 7:53 ` Qiantan Hong
2022-10-15 11:23 ` Po Lu
2022-10-15 18:29 ` Qiantan Hong
2022-10-16 0:26 ` Po Lu
2022-10-15 23:33 ` Qiantan Hong
2022-10-16 4:32 ` Po Lu
2022-10-16 6:29 ` Qiantan Hong
2022-10-16 6:41 ` Po Lu
2022-10-16 6:45 ` Po Lu
2022-10-23 9:11 ` Qiantan Hong
2022-10-23 10:58 ` Po Lu
2022-10-23 22:16 ` Qiantan Hong [this message]
2022-10-24 0:30 ` Po Lu
2022-10-24 4:17 ` Qiantan Hong
2022-10-24 5:38 ` Po Lu
2022-10-24 5:44 ` Qiantan Hong
2022-10-24 7:20 ` Po Lu
2022-10-16 20:51 ` [PATCH] Add user extension " Richard Stallman
2022-10-16 21:13 ` Alan Mackenzie
2022-10-18 11:58 ` Richard Stallman
2022-10-17 5:31 ` Eli Zaretskii
2022-10-17 8:28 ` Jean Louis
2022-10-19 17:04 ` Richard Stallman
2022-10-19 19:06 ` Eli Zaretskii
2022-10-20 19:46 ` Richard Stallman
2022-10-21 5:51 ` Eli Zaretskii
2022-10-21 6:02 ` Po Lu
2022-10-23 19:14 ` Richard Stallman
-- strict thread matches above, loose matches on Subject: below --
2020-08-28 2:25 [PATCH] Add user content " Qiantan Hong
2020-08-28 14:37 ` Lars Ingebrigtsen
2020-08-28 15:41 ` Qiantan Hong
2020-08-30 13:43 ` Lars Ingebrigtsen
2020-08-29 4:07 ` Richard Stallman
2020-08-29 4:10 ` Richard Stallman
2020-08-29 4:45 ` Qiantan Hong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=392D5A0E-AC2D-4582-8B81-777CB7C85D7A@stanford.edu \
--to=qthong@stanford.edu \
--cc=bobodeangelis@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=luangruo@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.