• src/sbbs3/js_internal.c

    From rswindell@VERT to CVS commit on Saturday, March 28, 2020 17:11:58
    src/sbbs3 js_internal.c 1.95 1.96
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv12239

    Modified Files:
    js_internal.c
    Log Message:
    Fix version number in js.exec() documentation: This method was added in v3.17c not v3.16.



    ---
    � Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Saturday, March 28, 2020 17:49:16
    src/sbbs3 js_internal.c 1.96 1.97
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv18457

    Modified Files:
    js_internal.c
    Log Message:
    Fix double-free (of startup_dir) in js.exec() method.
    Improve "script missing" error reporting in js.exec().



    ---
    � Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Saturday, March 28, 2020 21:49:17
    src/sbbs3 js_internal.c 1.97 1.98
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv26628

    Modified Files:
    js_internal.c
    Log Message:
    js.exec() enhancement: if any of the arguments to be passed to the executed script are arrays, pass each element of the array as a separate argument to the child script. This allows one script to generate a variable-length list of arguments to be passed to another.


    ---
    � Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net
  • From Tracker1@VERT/TRN to rswindell on Sunday, March 29, 2020 00:47:21
    Just curious... what would it take to get Synchronet up to the current spidermonkey engine?

    Related to your recent arguments change for `js.exec()`, having a spread operator would help for when writing such scripts.

    js.exec(...params)

    --
    Michael J. Ryan
    tracker1 +o Roughneck BBS

    ---
    � Synchronet � Roughneck BBS - coming back 2/2/20
  • From Digital Man@VERT to Tracker1 on Sunday, March 29, 2020 14:12:07
    Re: Re: src/sbbs3/js_internal.c
    By: Tracker1 to rswindell on Sun Mar 29 2020 01:47 am

    Just curious... what would it take to get Synchronet up to the current spidermonkey engine?

    A lot of work.

    Related to your recent arguments change for `js.exec()`, having a spread operator would help for when writing such scripts.

    js.exec(...params)

    We don't have the spread operator currently, but reading about it brought me to function.apply() which looks like that can be used to solve the js.exec() problem I had. I don't need to array argument trick. Thanks for the tip!

    digital man

    This Is Spinal Tap quote #16:
    David St. Hubbins: I believe virtually everything I read...
    Norco, CA WX: 63.9�F, 54.0% humidity, 3 mph ENE wind, 0.00 inches rain/24hrs

    ---
    � Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sunday, March 29, 2020 15:40:57
    src/sbbs3 js_internal.c 1.98 1.99
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv29776

    Modified Files:
    js_internal.c
    Log Message:
    Revert the last commit (mostly): don't treat array arguments to js.exec() specially, just pass them on to the script as-is. Included a JSDOC note about the use of js.exec.apply() to pass a variable number of arguments (ala execv).

    Thanks Tracker1 for the pointer to 'spread' which led me to function.apply() and the JS-standard method of achieving the result I needed with this enhancement.

    I still think that a script that calls exit() is unlikely to expect non-string arguments in the first place, but if we don't need special case behavior, it's better not to add it and keep the behavior consistent with load() and require(). That was the decision of the executive board anyway. :-|



    ---
    � Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Friday, September 25, 2020 16:58:22
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/41429b5f199747ddbb2ddb8b
    Modified Files:
    src/sbbs3/js_internal.c
    Log Message:
    Fix 'js' opbject property descriptions in jsobjs.html.

    ---
    � Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows@VERT to Git commit to main/sbbs/m on Thursday, August 08, 2024 12:38:00
    https://gitlab.synchro.net/main/sbbs/-/commit/c8a83171c6837d7dabfe698c
    Modified Files:
    src/sbbs3/js_internal.c
    Log Message:
    Fix CID 508259: Control flow issue (DEADCODE)

    ... introduced in commit 54523145

    ---
    � Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, January 20, 2025 20:16:51
    https://gitlab.synchro.net/main/sbbs/-/commit/aac89c726761dc86f77d501e
    Modified Files:
    src/sbbs3/js_internal.c
    Log Message:
    Don't call JS_GC() after js.exec() until new background threads exit

    Hopefully this will fix the occasional crash in the testsuites
    (and presumably, occasional crash in other things that use background
    threads with js.exec(), if there are any).

    Except this time, in the right place.

    ---
    � Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net