edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] switch compartment
@ 2014-02-12 10:21 Karl Dahlke
  2014-02-12 10:59 ` Adam Thompson
  0 siblings, 1 reply; 3+ messages in thread
From: Karl Dahlke @ 2014-02-12 10:21 UTC (permalink / raw)
  To: Edbrowse-dev

My latest push adds SWITCH_COMPARTMENT to js.h, as suggested by Adam,
and uses that macro in the establish... and set... functions in jsloc.cpp.
These are gateway functions from html into the javascript world.
I also unrooted a couple more parameters that were rooted
earlier when html did not understand these objects.
This should not change any behavior, it is just a step along the way.
Other functions need to use this macro,
and still other functions don't really need to set compartment
because they are internal.
Then we can write some error legs that close down javascript for this session
upon error, but still let edbrowse continue.

Karl Dahlke

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [Edbrowse-dev]  switch compartment
@ 2014-02-12 14:51 Karl Dahlke
  0 siblings, 0 replies; 3+ messages in thread
From: Karl Dahlke @ 2014-02-12 14:51 UTC (permalink / raw)
  To: Edbrowse-dev

> Yeah, I guess we'll need some wrappers to do this.

Well the logic is

if(unrecoverable failure) {
i_puts("helpful messsage saying your javascript is rendered invalid for this session,
but will still operate in other sessions.");
DestroyContext(cw->jss->jcx);
delete cw->jss);
cw->jss = NULL;
}

This could be a function, inline function, or macro,
guess I don't have strong feelings about that.

We'll need at least one new message which is fine;
just add some zeros on the end for the other languages
so I can keep the books.
Don't reindent messages.h, it messes up the line counts.
I've been driving for a while and need to work on some other things
so if you want to carry on for a bit that's fine.

Karl Dahlke

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

end of thread, other threads:[~2014-02-12 14:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-12 10:21 [Edbrowse-dev] switch compartment Karl Dahlke
2014-02-12 10:59 ` Adam Thompson
2014-02-12 14:51 Karl Dahlke

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