Skip to content
Snippets Groups Projects
  • Rob Swindell's avatar
    d33fa178
    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
    History
    Fix js.exec() returned nul" unless exit() was called explicitly
    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.