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] in compartment
Date: Wed, 19 Feb 2014 21:09:36 +0000	[thread overview]
Message-ID: <20140219210936.GN28870@toaster.adamthompson.me.uk> (raw)
In-Reply-To: <20140119153912.eklhad@comcast.net>

On Wed, Feb 19, 2014 at 03:39:12PM -0500, Karl Dahlke wrote:
> Maybe ... in javaSessionFail just print and set a flag,
> Then return because of the error condition.
> The calling function might then return because of the error,
> and so on, unwinding the stack all the way back to html.
> So there was an error but cw->jss is still there.

Sounds like a plan.

> in the SwitchCompartment macro,
> if js is dead then return, as we do today,
> but if it is still there and the abort flag is set then destroy context and set jss = null and return.

Hmm, I wonder if we have any nested SWITCH_COMPARTMENT calls which'd break this.
I quite like Chris's idea of leaving the destruction of the context until we're
sure the stack has unwound correctly.
> 
> Everything would unwind and free properly,
> and the js context would go away, perhaps on the next call.
> Maybe that would keep things from becoming a mess.

Hopefully. I'm going to implement this tonight to see how it turns out.

Would it be possible for the memory-hogging program to be added to jsrt as a
button (as you previously mentioned)
as that should give a repeatable test for this.
The existing way of browsing it then something else which uses javascript
triggers the unable to create window object error rather than a javascript
session failure.

Cheers,
Adam.

  reply	other threads:[~2014-02-19 21:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-19 20:39 Karl Dahlke
2014-02-19 21:09 ` Adam Thompson [this message]
2014-02-20  0:32   ` Adam Thompson
2014-02-20  1:39 Karl Dahlke
2014-02-20  9:30 ` 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=20140219210936.GN28870@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).