Closed emschwartz closed 10 years ago
Thank you!
My pleasure.
How would you feel about replacing the holaback pattern with the standard Node.js callback(error, result) pattern? On my fork I'm working on making that change, as well as piping stdout straight through for debugging purposes, and making an option to entirely disable logging. If those are more breaking than you'd be happy integrating then I'll just keep them on my fork. I'm also updating the tests and using chai/expect/sinon.
On Thu, Jun 19, 2014 at 11:26 AM, Gianni Chiappetta < notifications@github.com> wrote:
Thank you!
— Reply to this email directly or view it on GitHub https://github.com/gf3/sandbox/pull/31#issuecomment-46598210.
I am totally in favour of the callback change. I'm actually rewriting the sandbox in C++ to address some security concerns, so I would hold off with any other major features for the time being. And then once I've released the new version I'd be happy to chat about adding new features.
What exactly were the security concerns? And are you writing the whole sandbox in C++ or using another C++ sandbox?
On Thu, Jun 19, 2014 at 11:35 AM, Gianni Chiappetta < notifications@github.com> wrote:
I am totally in favour of the callback change. I'm actually rewriting the sandbox in C++ to address some security concerns, so I would hold off with any other major features for the time being. And then once I've released the new version I'd be happy to chat about adding new features.
— Reply to this email directly or view it on GitHub https://github.com/gf3/sandbox/pull/31#issuecomment-46599363.
You can read about it here, but basically it's not enough to write the sandbox in javascript with node. I am re-writing the entire sandbox to bypass node entirely for execution and use v8 directly.
Hmm, interesting. Do you have the proof of concept?
On Thu, Jun 19, 2014 at 11:39 AM, Gianni Chiappetta < notifications@github.com> wrote:
You can read about it here https://github.com/gf3/sandbox/issues/29, but basically it's not enough to write the sandbox in javascript with node. I am re-writing the entire sandbox to bypass node entirely for execution and use v8 directly.
— Reply to this email directly or view it on GitHub https://github.com/gf3/sandbox/pull/31#issuecomment-46599884.
Sandbox.postMessage sends messages through to the sandboxed code User code can handle incoming messages by defining global
onmessage
function User code can send messages through to the outside of the sandbox by using globalpostMessage
function Sandbox.on('message', function(message){...}) can be used to handle messages sent by sandboxed code Added tests, example, and documentation