edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] createJavacontext
@ 2014-02-11 17:12 Karl Dahlke
  2014-02-11 18:54 ` Adam Thompson
  0 siblings, 1 reply; 2+ messages in thread
From: Karl Dahlke @ 2014-02-11 17:12 UTC (permalink / raw)
  To: Edbrowse-dev

If the js runtime or context or global window cannot be created,
it prints a message to that effect, leaves jss null, and returns.
This is the first non-exit error leg in our js world.
Without the context, javascript is disabled,
but edbrowse continues to run.
You can test this easily.
Edit Chris memory hogging array program and another html file.
Browse the first and get the memory full error.
Switch to buffer 2 and browse the second,
but there isn't enough memory to set up the window,
so the context is not created, jss is null,
and any javascript features in that second file,
like onclick push buttons, won't work.
This is I think the start of where we want to go.
Other error legs will print a message,
distroy context, set jss to null, and return.

Karl Dahlke

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Edbrowse-dev] createJavacontext
  2014-02-11 17:12 [Edbrowse-dev] createJavacontext Karl Dahlke
@ 2014-02-11 18:54 ` Adam Thompson
  0 siblings, 0 replies; 2+ messages in thread
From: Adam Thompson @ 2014-02-11 18:54 UTC (permalink / raw)
  To: Karl Dahlke; +Cc: Edbrowse-dev

On Tue, Feb 11, 2014 at 12:12:23PM -0500, Karl Dahlke wrote:
> If the js runtime or context or global window cannot be created,
> it prints a message to that effect, leaves jss null, and returns.
> This is the first non-exit error leg in our js world.
> Without the context, javascript is disabled,
> but edbrowse continues to run.
> You can test this easily.
> Edit Chris memory hogging array program and another html file.
> Browse the first and get the memory full error.
> Switch to buffer 2 and browse the second,
> but there isn't enough memory to set up the window,
> so the context is not created, jss is null,
> and any javascript features in that second file,
> like onclick push buttons, won't work.

Yep, works well. I tried this with the array html program and jsrt.
Edbrowse didn't exit and javascript stopped as expected.

> This is I think the start of where we want to go.
> Other error legs will print a message,
> distroy context, set jss to null, and return.

Yep, sounds good. In the future it'd be nice if there was some way of
recovering a working js set up in some of these cases (e.g.
when js has run out of memory), but I can't think of a robust way at the moment,
and this is certainly a vast improvement.

Cheers,
Adam.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-11 18:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-11 17:12 [Edbrowse-dev] createJavacontext Karl Dahlke
2014-02-11 18:54 ` Adam Thompson

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).