edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Adam Thompson <arthompson1990@gmail.com>
To: Karl Dahlke <eklhad@comcast.net>
Cc: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] compartments
Date: Wed, 5 Feb 2014 10:44:39 +0000	[thread overview]
Message-ID: <20140205104439.GP32200@toaster.adamthompson.me.uk> (raw)
In-Reply-To: <20140104170341.eklhad@comcast.net>

On Tue, Feb 04, 2014 at 05:03:41PM -0500, Karl Dahlke wrote:
> > When I say a page within a window I'm referring
> > to the ability of edbrowse to go back pages.
> 
> cw = cw->prev
> 
> That's a little over simplified, but that's the idea,
> go back to the previous edbrowse window, a completely separate window.
> Really not different from switching buffers.
> The previous window has its own context, its own global object,
> its own html page, etc.

Ok. I'm not arguing this is a nice solution,
but when I tried to work around it, something wasn't working correctly.
I'm not entirely sure why but this was the only way I could get it to behave.

> I'm not going to mess with it now, I'm working on the representation of lines,
> but I may want to remove all those calls and just put one in jSyncup(),
> and see if that works.
> That is the function that is always called when you enter the world of javascript.
> Click a button, submit a form, change a field with onchange code,
> any of those things, calls jSyncup().

Are *all* the js functions called from within jsyncup?
I don't think this is the case with creating a new context etc,
so we still need that one. Also, at the time I did the js changes,
html.c was still there so putting it in there wasn't an option.
I've not touched any of the html code,
so I've got no idea how the ac calls have been done there.
At the end of the day, if *all* the js stuff in html.cpp happens within the
jsyncup call (so the ac object is still in scope)
then the compartment will be correct.
This means we can remove *many* of these calls which I'd say is a *good* thing,
but as I said, I was only working in the js files *not* the html code so I had
to set the compartment at the start of each js function which needed it.

> There might be a simpler function call.
There is, but Mozilla have said it's obsolete and they have a fairly good
record of just removing obsolete functions (and not always updating the docs to reflect this).
I can think of a bunch of functions which according to the docs *should* be
there (all be it marked obsolete) but aren't any more.

Now we've got html.cpp I'll have a look at what's been done and what can be cleaned up.

Cheers,
Adam.

  reply	other threads:[~2014-02-05 10:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-04 22:03 Karl Dahlke
2014-02-05 10:44 ` Adam Thompson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-02-05 13:55 Karl Dahlke
2014-02-05 22:09 ` Adam Thompson
2014-02-04 19:17 Karl Dahlke
2014-02-04 21:00 ` Adam Thompson

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=20140205104439.GP32200@toaster.adamthompson.me.uk \
    --to=arthompson1990@gmail.com \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    --cc=eklhad@comcast.net \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).