disable sandbox break propagation in scribble/eval
svn: r14221 original commit: 547101ac5bb81b9af1ccb39377fb6895101a2f2f
This commit is contained in:
parent
9f2af4697e
commit
dff49f902e
|
@ -238,7 +238,8 @@
|
||||||
(call-with-trusted-sandbox-configuration
|
(call-with-trusted-sandbox-configuration
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(parameterize ([sandbox-output 'string]
|
(parameterize ([sandbox-output 'string]
|
||||||
[sandbox-error-output 'string])
|
[sandbox-error-output 'string]
|
||||||
|
[sandbox-propagate-breaks #f])
|
||||||
(make-evaluator '(begin (require scheme/base)))))))
|
(make-evaluator '(begin (require scheme/base)))))))
|
||||||
|
|
||||||
(define (close-eval e)
|
(define (close-eval e)
|
||||||
|
@ -246,23 +247,24 @@
|
||||||
"")
|
"")
|
||||||
|
|
||||||
(define (do-plain-eval ev s catching-exns?)
|
(define (do-plain-eval ev s catching-exns?)
|
||||||
(call-with-values (lambda ()
|
(parameterize ([sandbox-propagate-breaks #f])
|
||||||
((scribble-eval-handler)
|
(call-with-values (lambda ()
|
||||||
ev
|
((scribble-eval-handler)
|
||||||
catching-exns?
|
ev
|
||||||
(let ([s (strip-comments s)])
|
catching-exns?
|
||||||
(cond
|
(let ([s (strip-comments s)])
|
||||||
[(syntax? s)
|
(cond
|
||||||
(syntax-case s (module)
|
[(syntax? s)
|
||||||
[(module . _rest)
|
(syntax-case s (module)
|
||||||
(syntax->datum s)]
|
[(module . _rest)
|
||||||
[_else s])]
|
(syntax->datum s)]
|
||||||
[(bytes? s)
|
[_else s])]
|
||||||
`(begin ,s)]
|
[(bytes? s)
|
||||||
[(string? s)
|
`(begin ,s)]
|
||||||
`(begin ,s)]
|
[(string? s)
|
||||||
[else s]))))
|
`(begin ,s)]
|
||||||
list))
|
[else s]))))
|
||||||
|
list)))
|
||||||
|
|
||||||
(define-syntax-rule (quote-expr e) 'e)
|
(define-syntax-rule (quote-expr e) 'e)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user