emacs-devel
[Top][All Lists]
Advanced

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

Re: About implementing libre.js/el in Emacs


From: Qiantan Hong
Subject: Re: About implementing libre.js/el in Emacs
Date: Mon, 31 Aug 2020 04:24:00 +0000


> On Aug 30, 2020, at 11:57 PM, Richard Stallman <rms@gnu.org> wrote:
> 
> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> 
>> Both will require adding primitives to Emacs C source to expose
>> urlRequest events, etc.
> 
> Can someone explain how those events work?  What do theese events do?
> What code generates them?
> 
> Why does it function that way, rather than by calling Lisp directly?

They are event (technically GTK signals) coming from WebkitGTK.
WebkitGTK emit those event at some interesting moments, e.g.
before a HTTP request is about to be sent. Librejs use Javascript
handlers to intercept requests, analyze scripts and block the bad
ones. This relies on the browser wrapping those event and expose
the interface to JS.

If we decide to let Librejs run in its JS form then we’ll have to do
what those browsers do.

We can also have Librejs.el. In this case there’s a technique concern
though, since WebkitGTK require the send-request signal
to be blocked *synchronously* when executing the signal callback,
we can’t do it the usual way that push a event into emacs’s
input event queue, we have to evaluate Emacs Lisp during
a GTK signal callback. Is this safe from, e.g., deadlock issues?

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

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