Skip to content

Commit

Permalink
* engine default sandboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
apg committed Feb 4, 2013
1 parent 46e962a commit 17e68c6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/engine.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@ path = require 'path'
util = require 'util'
vm = require 'vm'

MAX_CACHED_SANDBOXES = 100

sandboxCons = () ->
vm.createContext({})


class engine

constructor: (options) ->
options = options or {}
@verbose = options.verbose or false
@minimize = options.minimize or false
@pool = new Pool(sandboxCons, options.poolSize or 100)
@pool = new Pool(sandboxCons, options.poolSize or MAX_CACHED_SANDBOXES)
@prettyPrintErrors = if options.prettyPrintErrors? then options.prettyPrintErrors else true
@prettyLogErrors = if options.prettyLogErrors? then options.prettyLogErrors else true
@autoEscape = if options.autoEscape? then options.autoEscape else true
Expand Down

0 comments on commit 17e68c6

Please sign in to comment.