jackxiao / jslibs

Automatically exported from code.google.com/p/jslibs
0 stars 0 forks source link

Implement Sandbox.Exec #84

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Sandbox.Eval exists, however it would also be useful to be able to execute
a file directly in a sandbox rather than being limited to a string.

Original issue reported on code.google.com by nadir.se...@gmail.com on 19 Feb 2009 at 7:59

GoogleCodeExporter commented 9 years ago
A simple workaround consist in doing this:
  SandboxEval(new File('myScript.js').content); 
Or perhaps I don't see your actual need.

Original comment by sou...@gmail.com on 20 Feb 2009 at 12:52

GoogleCodeExporter commented 9 years ago
I know, but SandboxExec would be useful since Exec itself does a little more 
than
just running a string, it also handles xdr format.

Original comment by nadir.se...@gmail.com on 20 Feb 2009 at 9:32

GoogleCodeExporter commented 9 years ago
Exec() has a second argument to disable xdr.

Original comment by sou...@gmail.com on 2 Jun 2011 at 11:03