disable sandbox break propagation in scribble/eval

svn: r14221

original commit: 547101ac5bb81b9af1ccb39377fb6895101a2f2f
This commit is contained in:
Matthew Flatt 2009-03-22 16:42:35 +00:00
parent 9f2af4697e
commit dff49f902e

View File

@ -238,7 +238,8 @@
(call-with-trusted-sandbox-configuration
(lambda ()
(parameterize ([sandbox-output 'string]
[sandbox-error-output 'string])
[sandbox-error-output 'string]
[sandbox-propagate-breaks #f])
(make-evaluator '(begin (require scheme/base)))))))
(define (close-eval e)
@ -246,23 +247,24 @@
"")
(define (do-plain-eval ev s catching-exns?)
(call-with-values (lambda ()
((scribble-eval-handler)
ev
catching-exns?
(let ([s (strip-comments s)])
(cond
[(syntax? s)
(syntax-case s (module)
[(module . _rest)
(syntax->datum s)]
[_else s])]
[(bytes? s)
`(begin ,s)]
[(string? s)
`(begin ,s)]
[else s]))))
list))
(parameterize ([sandbox-propagate-breaks #f])
(call-with-values (lambda ()
((scribble-eval-handler)
ev
catching-exns?
(let ([s (strip-comments s)])
(cond
[(syntax? s)
(syntax-case s (module)
[(module . _rest)
(syntax->datum s)]
[_else s])]
[(bytes? s)
`(begin ,s)]
[(string? s)
`(begin ,s)]
[else s]))))
list)))
(define-syntax-rule (quote-expr e) 'e)