[mcclim-cvs] CVS mcclim/Apps/Inspector

thenriksen thenriksen at common-lisp.net
Sun Feb 3 23:42:01 UTC 2008


Update of /project/mcclim/cvsroot/mcclim/Apps/Inspector
In directory clnet:/tmp/cvs-serv11584/Apps/Inspector

Modified Files:
	inspector.lisp 
Log Message:
Added some security to Clouseau to assist in my primitive debugging methods.


--- /project/mcclim/cvsroot/mcclim/Apps/Inspector/inspector.lisp	2008/01/05 12:20:34	1.41
+++ /project/mcclim/cvsroot/mcclim/Apps/Inspector/inspector.lisp	2008/02/03 23:42:01	1.42
@@ -85,10 +85,18 @@
 		 (*print-level* 10))
 	     (run-frame-top-level
 	      (make-application-frame 'inspector :obj obj)))))
+    
+    (when (typep *application-frame* 'inspector)
+      (restart-case (error "Clouseau called from inside Clouseau, possibly infinite recursion")
+        (continue ()
+         :report "Continue by starting a new Clouseau instance")
+        (abort-clouseau ()
+         :report "Abort this call to Clouseau"
+         (return-from inspector))))
     (if new-process
 	(clim-sys:make-process #'run
-			       :name (format nil "Inspector Clouseau: ~S"
-					     obj))
+         :name (format nil "Inspector Clouseau: ~S"
+                       obj))
 	(run))
     obj))
 
@@ -766,7 +774,8 @@
   (frame-exit *application-frame*))
 
 (define-inspector-command (com-inspect :name t) ()
-  (let ((obj (accept t :prompt "Select an object")))
+  (let ((obj (accept t :prompt "Select an object"))
+        (*application-frame* nil))      ; To get around security.
     (inspector obj :new-process t)))
 
 (define-inspector-command (com-toggle-show-list-cells :name t)




More information about the Mcclim-cvs mailing list