From: Chris Brannon <chris@the-brannons.com>
To: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] Error Legs
Date: Fri, 07 Feb 2014 07:05:32 -0800 [thread overview]
Message-ID: <87zjm3ezer.fsf@mushroom.PK5001Z> (raw)
In-Reply-To: <20140107090114.eklhad@comcast.net> (Karl Dahlke's message of "Fri, 07 Feb 2014 09:01:14 -0500")
Karl Dahlke <eklhad@comcast.net> writes:
> The expedient approach is to wrapper some of the js calls,
It's even easier than that. my_ErrorReporter gets a pointer to
JSErrorReport, which will tell us exactly what went wrong. So we can
exit on out-of-memory inside my_ErrorReporter. No wrappers, no other
error legs needed, I think.
Do a pull, and you'll see what I mean.
Now here are the open questions. Do we need to be exiting on conditions
other than out-of-memory? Maybe we do, and we don't know what they are
yet...
Also, this strategy is fine when a native C function, such as domLink,
fails to allocate. However, if the out-of-memory condition happens in a
script, passed to JS_EvaluateScript, it is converted to a JavaScript
exception. my_ErrorReporter will get called to indicate the failure,
but the failure will be converted to "uncaught exception: out of
memory", indicating that the script failed to catch the exception.
my_ErrorReporter will see an out-of-memory condition the next time a C
function fails to allocate. Is this good enough?
Ideally, I'd like to know about out-of-memory during script evaluation,
rather than having it silently converted to a JS exception, but I don't
think we can do that.
Look at my http://the-brannons.com/array.html example if the previous
paragraph is unclear.
-- Chris
next prev parent reply other threads:[~2014-02-07 15:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-07 14:01 Karl Dahlke
2014-02-07 15:05 ` Chris Brannon [this message]
2014-02-07 17:57 Karl Dahlke
2014-02-07 18:23 ` Chris Brannon
2014-02-09 10:45 ` Adam Thompson
2014-02-09 11:10 ` Adam Thompson
2014-02-07 19:37 Karl Dahlke
2014-02-07 19:55 ` Chris Brannon
2014-02-07 20:06 Karl Dahlke
2014-02-09 14:18 Karl Dahlke
2014-02-09 15:13 ` Adam Thompson
2014-02-09 14:48 Karl Dahlke
2014-02-09 15:21 ` 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=87zjm3ezer.fsf@mushroom.PK5001Z \
--to=chris@the-brannons.com \
--cc=Edbrowse-dev@lists.the-brannons.com \
/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).