Skip to content
Snippets Groups Projects
  • deuce's avatar
    f3256d81
    Fix exit() behaviour by introducing the new js.scope value which is the · f3256d81
    deuce authored
    scripts global scope (as opposed to js.global which is the instance global
    scope), and having exit() define exit_code in js.scope instead of js.global.
    
    This also sets exit_code in js.scope to null when preparing to execute a new
    script.  If a new script starts in the same scope as an old one, the old
    exit_code value will be destroyed.
    
    This should only impact scripts where js.global != js.scope (bbs.exec()ed,
    and mailsrvr)
    f3256d81
    History
    Fix exit() behaviour by introducing the new js.scope value which is the
    deuce authored
    scripts global scope (as opposed to js.global which is the instance global
    scope), and having exit() define exit_code in js.scope instead of js.global.
    
    This also sets exit_code in js.scope to null when preparing to execute a new
    script.  If a new script starts in the same scope as an old one, the old
    exit_code value will be destroyed.
    
    This should only impact scripts where js.global != js.scope (bbs.exec()ed,
    and mailsrvr)