[prev in list] [next in list] [prev in thread] [next in thread] 

List:       elinks-dev
Subject:    Re: Re: [elinks-dev] Re: [ELinks] elinks - pasky: If allocating
From:       Petr Baudis <pasky () ucw ! cz>
Date:       2004-10-23 18:40:35
Message-ID: 20041023184035.GH23087 () pasky ! ji ! cz
[Download RAW message or body]

Dear diary, on Sat, Oct 23, 2004 at 04:34:49PM CEST, I got a letter,
where Jonas Fonseca <fonseca@diku.dk> told me, that...
> Jonas Fonseca <fonseca@diku.dk> wrote Sat, Oct 23, 2004:
> > cvs@pasky.or.cz <cvs@pasky.or.cz> wrote Thu, Oct 21, 2004:
> > > This is an automated notification of a change to the ELinks CVS tree.
> > > 
> > > Author: pasky
> > > Module: elinks
> > > Tag: <TRUNK>
> > > Date: Thu Oct 21 23:22:05 2004 GMT
> > > 
> > > ---- Log message:
> > > 
> > > If allocating vs->ecmascript doesn't work out, set vs->ecmascript_fragile so \
> > > that we try again the next time. 
> > > 
> > > ---- Files affected:
> > > 
> > > elinks/src/ecmascript:
> > > ecmascript.c (1.21 -> 1.22) 
> > > http://cvsweb.elinks.or.cz/cvsweb.cgi/elinks/src/ecmascript/ecmascript.c.diff?r1=1.21&r2=1.22&f=u
> > >  
> > > 
> > > ---- Diffs:
> > > 
> > > elinks/src/ecmascript/ecmascript.c |    2 ++
> > > 1 files changed, 2 insertions(+)
> > > 
> > > 
> > > Index: elinks/src/ecmascript/ecmascript.c
> > > diff -u elinks/src/ecmascript/ecmascript.c:1.21 \
> > >                 elinks/src/ecmascript/ecmascript.c:1.22
> > > --- elinks/src/ecmascript/ecmascript.c:1.21	Fri Oct 22 01:18:39 2004
> > > +++ elinks/src/ecmascript/ecmascript.c	Fri Oct 22 01:22:00 2004
> > > @@ -107,6 +107,8 @@
> > > 	if (vs->ecmascript)
> > > 		ecmascript_put_interpreter(vs->ecmascript);
> > > 	vs->ecmascript = ecmascript_get_interpreter(vs);
> > > +	if (!vs->ecmascript)
> > > +		vs->ecmascript_fragile = 1;
> > > }
> > > 
> > > 
> > 
> > <pedantic>
> > 
> > Instead of |vs->ecmascript_fragile = 1| all over the tree (there are now
> > ten places it is assigned to and is becomming hard to reason about)
> > it would be great to have it somehow encapsulated. You could start by
> > moving this check into ecmascript_get_interpreter() so atleast the
> > assignment in ecmascript_reset_state() can be removed.
> > 
> > </pedantic>
> 
> What I am trying to say is. Ecmascript adds considerable complexity and
> somehow we should deal with it before it becomes a real problem.  I
> would have ending up in a situation like the HTML renderer where
> changing one thing unexpectedly creates buggy issues in a different part
> of the code (example: link numbering and super/sub-script handling)

As I said, this ecmascript_fragile bussiness is messy and I probably
abused it, the thing is that the whole ECMAScript is _really_
wide-scale, touching huge scope of the code and I'm not sure about
various implications and I'm a little afraid of other unexpected
crashes. But I should probably just throw the ecmascript_fragile usage
everywhere but where it's been discovered to be necessary, and possibly
reintroduce it to the other places later when crashes will come out.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
For every complex problem there is an answer that is clear, simple,
and wrong.  -- H. L. Mencken
_______________________________________________
ELinks-dev mailing list
ELinks-dev@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic