Add a very limited sandbox example to dist. The example illustrates how
the basic sandboxing process works, and how to implement a wrapper for
standard memory functions.
The example should be improved to include the best practices from the
internal sandbox doc.
Add a "jxpretty" command line example, which pretty prints JSON from stdin
to indented JX stdout. This is more a demonstration of the JX format which
is a bit easier to read than standard JSON.
Also change coffeescript example to match the other examples: move the
Makefile to dist/Makefile.coffee like the others. A few whitespace trivia
issues also fixed.
Add first draft of sandboxing suggestions. Sandboxing is not yet fully
thought out so these suggestions are not complete. Duktape 1.0 does not
yet have bytecode executor timeout functionality, so there is no way to
implement protection against CPU hogging. Internal property access and
buffer value access are in conflict and may need a better solution in a
later version.
Detect accidentally unwrapped math functions etc in code policy check. This
would have caught the missing fpclassify() wrapping which broke the build on
some platforms.
This merge also fixes various offenders, and fixes a few small bugs.
Without the suffixes the struct used "free", "alloc", and "realloc". These
shadow names from the standard library. Usually this is not an issue, but
if the standard names are #defines, compile can fail.