Skip to content
Snippets Groups Projects
  1. Apr 02, 2021
    • Deucе's avatar
      Initial work on setTimeout() · 19289739
      Deucе authored
      This appears to work and the event handler *should* work on other
      event types already.
      
      Note, this is *nix-only due to the use of poll().  select() will
      need to be used for Windows to keep XP compatability.
      19289739
  2. Mar 06, 2021
  3. Feb 28, 2021
  4. Feb 15, 2021
    • Rob Swindell's avatar
      Address more Coverity issues · 141e01bf
      Rob Swindell authored
      Reverted the SAFECOPY() NULL source-pointer magic "(null)" string thing as that caused a different Coverity issue. Explicitly check for NULL at the call-sites instead.
      141e01bf
    • Rob Swindell's avatar
      Address more Coverity issues · dd000f6e
      Rob Swindell authored
      Reverted the SAFECOPY() NULL source-pointer magic "(null)" string thing as that caused a different Coverity issue. Explicitly check for NULL at the call-sites instead.
      dd000f6e
  5. Jan 17, 2021
  6. Jan 16, 2021
    • Rob Swindell's avatar
      Fix js.exec() returned nul" unless exit() was called explicitly · d33fa178
      Rob Swindell authored
      Don't use the "exit_code" property value as the return value of js.exec() unless it's a number. As reported by mlong (thanks).
      
      Also, "exit_code" was being set to null (instead of void/undefined) in js_PrepareToExecute(). I think this was just an oversight or typo by Deuce from his commit of 5 years ago (f3256d81). Since we're comparing exit_code with JSVAL_VOID in other places to determine if it was actually set, this appears to be a long standing bug.
      d33fa178
  7. Nov 23, 2020
    • Deucе's avatar
      Add generic on_exit support. · f67ca829
      Deucе authored
      Store all on_exit() strings in the global scope, execute them
      one scope at a time with scopes ordered in reverse order of
      first call to js.on_exit().  Within a scope, they are ordered
      last string first.
      f67ca829
  8. Nov 18, 2020
  9. Sep 26, 2020
  10. Aug 16, 2020
  11. Mar 29, 2020
  12. Aug 29, 2019
  13. Aug 28, 2019
  14. Aug 27, 2019
  15. Aug 26, 2019
  16. Aug 25, 2019
    • rswindell's avatar
      Fix typo in previous commit. Thanks, NotBert. · d114d05b
      rswindell authored
      d114d05b
    • deuce's avatar
      Add js.exec(). · d53cddaf
      deuce authored
      This allows executing a new script in a specified scope, much like load().
      There are important differences however...
      1) js.exec() *must* specify a scope.
      2) js.exec()d scripts can call exit() and their handlers are ran then,
         rather than when the parent script exists as in js.load().
      3) The js object is installed in the scope with the real JS object as the
         prototype.  This generally shouldn't be an issue, but if you're doing
         strange things, stranger things may happen.
      4) As part of #3, the exec_path/exec_dir/exec_file/startup_dir/scope
         properties of the JS object represent the new script, not the calling
         one.
      5) js.exec() only searches in the passed startup dir (if specified) and the
         current js.exec_dir path.  It does not search the load paths or the mods
         directory at all.
      
      This API is also subject to change.
      d53cddaf
  17. Dec 28, 2018
  18. Feb 20, 2018
  19. Sep 26, 2015
  20. Apr 25, 2015
    • deuce's avatar
      Add jsdocs for js.scope. · 18e8e576
      deuce authored
      18e8e576
    • deuce's avatar
      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
  21. Oct 08, 2013
  22. Oct 03, 2013
  23. Sep 13, 2013
  24. Mar 16, 2013
  25. Feb 08, 2013
  26. Mar 15, 2012
  27. Nov 12, 2011
Loading