commit dff49f902eed502065fcacb39857437ad80f1088
parent 9f2af4697e5381870702634a7b73cfcd1bfeb321
Author: Matthew Flatt <mflatt@racket-lang.org>
Date: Sun, 22 Mar 2009 16:42:35 +0000
disable sandbox break propagation in scribble/eval
svn: r14221
original commit: 547101ac5bb81b9af1ccb39377fb6895101a2f2f
Diffstat:
1 file changed, 20 insertions(+), 18 deletions(-)
diff --git a/collects/scribble/eval.ss b/collects/scribble/eval.ss
@@ -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)