fix more break-progaration problems in scheme/sandbox (where recent changes were not quite right)
svn: r14219
This commit is contained in:
parent
769ad3e98a
commit
a61e7b67f9
|
@ -682,8 +682,8 @@
|
|||
(evaluate-program
|
||||
(if (procedure? program-maker) (program-maker) program-maker)
|
||||
limit-thunk
|
||||
(and coverage? (lambda (es+get) (set! uncovered es+get)))))))
|
||||
(channel-put result-ch 'ok)
|
||||
(and coverage? (lambda (es+get) (set! uncovered es+get))))))
|
||||
(channel-put result-ch 'ok))
|
||||
(set! eval-handler (cadr (sandbox-eval-handlers))) ; interactions handler
|
||||
;; finally wait for interaction expressions
|
||||
(let ([n 0])
|
||||
|
@ -711,7 +711,6 @@
|
|||
(call-with-values run list))))))
|
||||
(loop)))))))
|
||||
(define (get-user-result)
|
||||
(let ([get-result (lambda () (sync user-done-evt result-ch))])
|
||||
(if (and (sandbox-propagate-breaks)
|
||||
;; The following test is weird. We reliably catch breaks if breaks
|
||||
;; are enabled, except that a break just before or after isn't
|
||||
|
@ -725,11 +724,9 @@
|
|||
#f
|
||||
(let loop ()
|
||||
(with-handlers* ([exn:break? (lambda (e) (user-break) (loop))])
|
||||
(parameterize-break
|
||||
#t
|
||||
(get-result)))))
|
||||
;; The same case doesn't have to deal with breaks:
|
||||
(get-result))))
|
||||
(sync/enable-break user-done-evt result-ch))))
|
||||
;; The simple case doesn't have to deal with breaks:
|
||||
(sync user-done-evt result-ch)))
|
||||
(define (user-eval expr)
|
||||
;; the thread will usually be running, but it might be killed outside of
|
||||
;; the sandboxed environment, for example, if you do something like
|
||||
|
|
Loading…
Reference in New Issue
Block a user