- In case of large string the sandbox initialization failed because of an OOM
* so allocate a new string in the heap
* and free it after use.
- it requires a quickjs update since we need to export some symbols (stringToNewUTF8 and free).
Build
In order to generate the file quickjs-eval.js:
- git clone https://github.com/mozilla/pdf.js.quickjs/
- the build requires to have a Docker setup and then:
node build.js -Cto build the Docker imagenode build.js -co /pdf.js/external/quickjs/to compile the sandbox
Licensing
Quickjs and pdf.js.quickjs are released under MIT license so quickjs-eval.js is released under MIT license too.