From bfd63663eb8a2af01b56d05b140e0ea08a464397 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 15 Apr 2009 11:05:13 +0000 Subject: Merged revisions 7071-7082 via svnmerge from svn://source.netsurf-browser.org/branches/jmb/hubbub-errors ........ r7077 | jmb | 2009-04-15 11:32:43 +0100 (Wed, 15 Apr 2009) | 2 lines Don't bother attempting to allow restarting the parser after an error in the treebuilder. It's far too complicated. ........ r7078 | jmb | 2009-04-15 11:46:12 +0100 (Wed, 15 Apr 2009) | 2 lines Document what should happen in exceptional circumstances ........ svn path=/trunk/hubbub/; revision=7083 --- docs/Architecture | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'docs') diff --git a/docs/Architecture b/docs/Architecture index 90d8688..23c820a 100644 --- a/docs/Architecture +++ b/docs/Architecture @@ -54,3 +54,18 @@ Parse errors Notification of parse errors is made through a dedicated event. This event contains the line/column offset of the error location, along with a message detailing the error. + +Exceptional circumstances +------------------------- + + Exceptional circumstances (such as memory exhaustion) are reported + immediately. + + The parser's state in such situations is undefined. There is no recovery + mechanism. + + Therefore, if the client is able to recover from the exceptional + circumstance (e.g. by making more free memory available) the only valid + way to proceed is to create a new parser instance and start parsing from + scratch. The client should ensure that they destroy the old parser instance + and any DOM tree produced by it, to avoid resource leaks. -- cgit v1.2.3