- Feb 27, 2024
-
-
Rob Swindell authored
User disconnection will trigger auto-terminate (eventually) as well. But only in the terminal server.
-
- Jan 20, 2024
-
-
Rob Swindell authored
Still using BOOL where we need Win32 API compatibility. Using JSBool instead of BOOL or bool where it matters. Changed most relevant TRUE/FALSE to true/false too (though it's not as critical). You shouldn't need to #include <stdbool.h> anywhere now - gen_defs.h should do that automatically/correctly based on the language/version/tool. In C23, stdbool.h isn't even needed for bool/true/false definitions (they're keywords), so we don't bother including stdbool.h in that case. Microsoft didn't define __STDC_VERSION__ in their older tool chains (even though they were C99 compatible and had stdbool.h), so we use a _MSC_VER check to know that there's a stdbool.h we should use in that case. For other/old compilers (e.g. Borland C) we #define bool/true/false following the pattern of stdbool.h (doesn't use a typedef). I didn't convert UIFC yet. This addresses issue #698
-
- Dec 31, 2023
-
-
Rob Swindell authored
Should calm the clang warnings reported by Deuce: e.g. passing 'char *[18]' to parameter of type 'const char **' discards qualifiers in nested pointer types
-
- Dec 14, 2023
-
-
Rob Swindell authored
When a JS environment (e.g. server, jsexec) is terminated, it's possible that a require() script was being evaluated. But since termination would abort that evaluation, it's not unexpected if a symbol ends up not being defined before the require() script was terminated, so don't report an error in that case. Fix issue #681
-
- Nov 07, 2023
-
-
Rob Swindell authored
Replaced _property_ver_list (array of numbers) with _property_ver_list (array of objects) with a "ver" and (optional) "desc" property. This solves the enumeration order problem with objects that have both manual and table-based properties. Object's property tables (arrays of jsSyncPropertySpec) can now (optionally) contain the property descriptions. For properties defined in this manner, there will never be another mismatch between ther name/type and description/version in the jsobjs.html (a problem has re-occurred several times through the years with nebulous work-arounds). We still use _property_desc_list arrays for additional (e.g. manually defined) properties in such objects or just objects that only use one method of property definition and are not subject to the enumeration order problem. Fixed numerous typos. Using more consistent terminology and HTML mark-up. Some beautification and enhancement of readability, but nothing too major.
-
- Sep 01, 2023
-
-
Rob Swindell authored
Fixes issue #611
-
- Jul 21, 2023
-
-
Rob Swindell authored
If the search up the scope tree for js.exec_dir fails, the script 'path' would be left blank leading to a weird error message. e.g. !JavaScript default.js line 249: Error: Script file () does not exist
-
- Mar 14, 2023
-
-
Rob Swindell authored
Add some missing descriptions, fix the order of others.
-
Rob Swindell authored
Mainly capitalization, but some typos and added details.
-
- Feb 13, 2023
-
-
Rob Swindell authored
-
- Feb 23, 2022
-
-
Rob Swindell authored
- setInterval() returns a Number, not an Object. - typos fixed - markup added
-
- May 22, 2021
-
-
Deucе authored
-
- Apr 13, 2021
-
-
Deucе authored
If a callback deletes the one-shot event that invoked it, the event pointer in the caller would be to free()d memory with hilarious results.
-
- Apr 08, 2021
- Apr 05, 2021
-
-
Deucе authored
-
Deucе authored
Previously, timed or polled callbacks were required to keep the event loop running.
-
Deucе authored
-
Deucе authored
I haven't added a clearImmediate() because there's currently no way of manipulating the run queue, and I can't come up with a reason someone would actually need it.
-
Deucе authored
Was terribly broken.
-
- Apr 04, 2021
-
-
Rob Swindell authored
This macro has expanded to nothing for a while now and even before, the usage was misguided and unnecessary as explained in this video: https://www.youtube.com/watch?v=cjotPqQxxAY
-
Deucе authored
Non-poll used the wrong value for calculating the high socket (which is ignored on Win32, the only non-poll() user), and the socket was being set in the wrong union member.
-
Rob Swindell authored
This won't impact Synchronet as it has a separate signal handling thread, but we still need to behave properly for processes that don't. I'm also saying that ENOMEM does not indicate a disconnection, though it may be better to pretend it was disconnected...
-
- Apr 03, 2021
-
-
Deucе authored
js_callback_t was not being properly retreived.
-
- Apr 02, 2021
-
-
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.
-
- Mar 06, 2021
-
-
Rob Swindell authored
-
- Feb 28, 2021
-
-
Deucе authored
-
- Feb 15, 2021
-
-
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.
-
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.
-
- Jan 17, 2021
-
-
Rob Swindell authored
<@Deuce> Just saying that if someone does the work of exit_code = {thing: function(x) { return secretsauce }); exit(); they should get away with it.
-
- Jan 16, 2021
-
-
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.
-
- Nov 23, 2020
-
-
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.
-
- Nov 18, 2020
- Sep 26, 2020
-
-
Rob Swindell authored
-
- Aug 16, 2020
-
-
Rob Swindell authored
-
- Mar 29, 2020
-
-
rswindell authored
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. :-|
-
rswindell authored
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.
-
rswindell authored
Improve "script missing" error reporting in js.exec().
-