Dear diary, on Sun, Feb 20, 2005 at 09:07:30PM CET, I got a letter,
where [EMAIL PROTECTED] told me, that...
> This is an automated notification of a change to the ELinks CVS tree.
> 
> Author: witekfl
> Module: elinks
>    Tag: <TRUNK>
>   Date: Sun Feb 20 20:07:30 2005 GMT
> 
> ---- Log message:
> 
> It's strange, but it must be so.
> 
> 
> 
> ---- Files affected:
> 
> elinks/src/ecmascript:
>    spidermonkey.c (1.192 -> 1.193) 
>     
> http://cvsweb.elinks.or.cz/cvsweb.cgi/elinks/src/ecmascript/spidermonkey.c.diff?r1=1.192&r2=1.193&f=u
> 
> 
> ---- Diffs:
> 
>  elinks/src/ecmascript/spidermonkey.c |   13 ++++++++-----
>  1 files changed, 8 insertions(+), 5 deletions(-)
> 
> 
> Index: elinks/src/ecmascript/spidermonkey.c
> diff -u elinks/src/ecmascript/spidermonkey.c:1.192 
> elinks/src/ecmascript/spidermonkey.c:1.193
> --- elinks/src/ecmascript/spidermonkey.c:1.192        Sun Feb 20 20:52:18 2005
> +++ elinks/src/ecmascript/spidermonkey.c      Sun Feb 20 21:07:24 2005
> @@ -1585,9 +1585,8 @@
>       struct session *ses = doc_view->session;
>  
>       go_back(ses);
> -     string_to_jsval(ctx, rval, "");
>  
> -     return JS_TRUE;
> +     return 2;
>  }
>  
>  
> @@ -2152,13 +2151,17 @@
>  {
>       JSContext *ctx;
>       jsval rval;
> +     int ret;
>  
>       assert(interpreter);
>       ctx = interpreter->backend_data;
>       setup_safeguard(interpreter, ctx);
> -     if (JS_EvaluateScript(ctx, JS_GetGlobalObject(ctx),
> -                           code->source, code->length, "", 0, &rval)
> -         == JS_FALSE) {
> +     ret = JS_EvaluateScript(ctx, JS_GetGlobalObject(ctx),
> +                       code->source, code->length, "", 0, &rval);
> +     if (ret == 2) {
> +             return 0;
> +     };              
> +     if (ret == JS_FALSE) {
>               return -1;
>       }
>       if (JSVAL_IS_VOID(rval)) {

Also, could you please explain this hack in a comment in the code? Why
did you do that?

-- 
                                Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
98% of the time I am right. Why worry about the other 3%.
_______________________________________________
ELinks-dev mailing list
[email protected]
http://linuxfromscratch.org/mailman/listinfo/elinks-dev

Reply via email to