[bknr-cvs] edi changed trunk/thirdparty/hunchentoot/

BKNR Commits bknr at bknr.net
Wed Apr 7 06:45:06 UTC 2010


Revision: 4524
Author: edi
URL: http://bknr.net/trac/changeset/4524

Fix breakage of LW version

U   trunk/thirdparty/hunchentoot/conditions.lisp
U   trunk/thirdparty/hunchentoot/doc/index.xml
U   trunk/thirdparty/hunchentoot/packages.lisp
U   trunk/thirdparty/hunchentoot/specials.lisp

Modified: trunk/thirdparty/hunchentoot/conditions.lisp
===================================================================
--- trunk/thirdparty/hunchentoot/conditions.lisp	2010-03-31 13:41:11 UTC (rev 4523)
+++ trunk/thirdparty/hunchentoot/conditions.lisp	2010-04-07 06:45:06 UTC (rev 4524)
@@ -90,55 +90,15 @@
   "Used to signal an error if an operation named NAME is not implemented."
   (error 'operation-not-implemented :operation name))
 
-(defun kill-all-debugging-threads ()
-  "Used for destroy all debugging threads"
-  (with-lock-held (*debugging-threads-lock*)
-    (dolist (thread *debugging-threads*)
-      (when (ignore-errors
-              (bt:destroy-thread thread)
-              t)
-        (setf *debugging-threads*
-              (remove thread *debugging-threads*))))))
-
-(defun debug-mode-on ()
-  "Used to enable debug mode"
-  (setf *catch-errors-p* nil))
-
-(defun debug-mode-off (&optional (kill-debugging-threads t))
-  "Used to turn off debug mode"
-  (setf *catch-errors-p* t)
-  (when kill-debugging-threads
-    (kill-all-debugging-threads)))
-
-(defun after-close-swank-connection (connection)
-  "Turns off debug mode and destroy debugging threads after closing the connection with the swank-server"
-  (declare (ignore connection))
-  (debug-mode-off t))
-
-(when (find-package :swank)
-  (ignore-errors
-    (eval `(,(find-symbol (string '#:add-hook) :swank) 
-             ,(find-symbol (string '#:*connection-closed-hook*) :swank)
-             'after-close-swank-connection))))
-
 (defgeneric maybe-invoke-debugger (condition)
   (:documentation "This generic function is called whenever a
 condition CONDITION is signaled in Hunchentoot.  You might want to
 specialize it on specific condition classes for debugging purposes.")
   (:method (condition)
-    "The default method invokes the debugger with CONDITION if
+   "The default method invokes the debugger with CONDITION if
 *CATCH-ERRORS-P* is NIL."
-    (unless (or *catch-errors-p*
-                (<= *max-debugging-threads*
-                    (length *debugging-threads*)))
-      (let ((thread (bt:current-thread)))
-        (with-lock-held (*debugging-threads-lock*)
-          (push thread *debugging-threads*))
-        (unwind-protect
-             (invoke-debugger condition)
-          (with-lock-held (*debugging-threads-lock*)
-            (setf *debugging-threads*
-                  (remove thread *debugging-threads*))))))))
+   (unless *catch-errors-p*
+     (invoke-debugger condition))))
 
 (defmacro with-debugger (&body body)
   "Executes BODY and invokes the debugger if an error is signaled and

Modified: trunk/thirdparty/hunchentoot/doc/index.xml
===================================================================
--- trunk/thirdparty/hunchentoot/doc/index.xml	2010-03-31 13:41:11 UTC (rev 4523)
+++ trunk/thirdparty/hunchentoot/doc/index.xml	2010-04-07 06:45:06 UTC (rev 4524)
@@ -152,12 +152,6 @@
       <a href="http://common-lisp.net/~loliveira/ediware/">http://common-lisp.net/~loliveira/ediware/</a>.
     </p>
 
-    <p>
-      Andrey Moskvitin maintains a <a href="http://git-scm.com/">git</a>
-      repository of Hunchentoot at
-      <a href="http://github.com/archimag/hunchentoot">http://github.com/archimag/hunchentoot</a>.
-    </p>
-
     <clix:subchapter name="proxy" title="Hunchentoot behind a proxy">
 
       If you're feeling unsecure about exposing Hunchentoot to the wild,
@@ -2652,45 +2646,6 @@
     </clix:description>
   </clix:special-variable>
 
-  <clix:function name='debug-mode-on'>
-    <clix:description>
-Enable debug mode: sets the value of <clix:ref>*CATCH-ERRORS-P*</clix:ref> to <code>NIL</code>.
-    </clix:description>
-  </clix:function>
-
-  <clix:function name='debug-mode-off'>
-   <clix:lambda-list><clix:lkw>optional</clix:lkw> kill-debugging-threads
-   </clix:lambda-list>
-    <clix:description>
-Disable debug mode: sets the value
-of <clix:ref>*CATCH-ERRORS-P*</clix:ref> to <code>T</code>.  If the
-value of <clix:arg>kill-debugging-threads</clix:arg>
-is <code>T</code>, which is the default, all threads that are sent to
-the debugger by <clix:ref>MAYBE-INVOKE-DEBUGGER</clix:ref> will be
-terminated.  If
-a <a href="http://common-lisp.net/project/slime/">swank</a> server is
-present, <code>(debug-mode-off t)</code> will be automatically be
-called after the connection to the swank server is established: this
-provides some protection when debug mode has accidentially been
-enabled in a production environment.
-    </clix:description>
-  </clix:function>
-
-  <clix:special-variable name='*max-debugging-threads*'>
-    <clix:description>
-This variable determines the maximum number of threads that are sent
-to
-the <a href="http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_d.htm#debugger">debugger</a>
-by <clix:ref>MAYBE-INVOKE-DEBUGGER</clix:ref>.  The default for this
-parameter is 5.  Once this limit is
-reached, <clix:ref>MAYBE-INVOKE-DEBUGGER</clix:ref> does not invoke
-the debugger for new threads that signal an error.  This behavior can
-be helpful for safer debugging a production environment.
-See <clix:ref>MAYBE-INVOKE-DEBUGGER</clix:ref> if you want to
-fine-tune this behaviour.
-    </clix:description>
-  </clix:special-variable>
-
   <clix:function generic='true' name='maybe-invoke-debugger'>
   <clix:lambda-list>condition
   </clix:lambda-list>
@@ -2705,9 +2660,7 @@
 method <a
 href="http://www.lispworks.com/documentation/HyperSpec/Body/f_invoke.htm">invokes
 the debugger</a> with <clix:arg>condition</clix:arg> if
-<clix:ref>*CATCH-ERRORS-P*</clix:ref> is <code>NIL</code> and the number of active <a
-href="http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_d.htm#debugger">debuggers</a>
-is less than <clix:ref>*MAX-DEBUGGING-THREADS*</clix:ref>.
+<clix:ref>*CATCH-ERRORS-P*</clix:ref> is <code>NIL</code>.
     </clix:description>
   </clix:function>
 

Modified: trunk/thirdparty/hunchentoot/packages.lisp
===================================================================
--- trunk/thirdparty/hunchentoot/packages.lisp	2010-03-31 13:41:11 UTC (rev 4523)
+++ trunk/thirdparty/hunchentoot/packages.lisp	2010-04-07 06:45:06 UTC (rev 4524)
@@ -62,7 +62,6 @@
            "*LOG-LISP-BACKTRACES-P*"
            "*LOG-LISP-ERRORS-P*"
            "*LOG-LISP-WARNINGS-P*"
-           "*MAX-DEBUGGING-THREADS*"
            "*MESSAGE-LOG-PATHNAME*"
            "*METHODS-FOR-POST-PARAMETERS*"
            "*REPLY*"
@@ -265,7 +264,5 @@
            "URL-DECODE"
            "URL-ENCODE"
            "USER-AGENT"
-           "WITHIN-REQUEST-P"
-           "DEBUG-MODE-ON"
-           "DEBUG-MODE-OFF"))
+           "WITHIN-REQUEST-P"))
 

Modified: trunk/thirdparty/hunchentoot/specials.lisp
===================================================================
--- trunk/thirdparty/hunchentoot/specials.lisp	2010-03-31 13:41:11 UTC (rev 4523)
+++ trunk/thirdparty/hunchentoot/specials.lisp	2010-04-07 06:45:06 UTC (rev 4524)
@@ -236,16 +236,6 @@
   "Whether Hunchentoot should catch and log errors \(or rather invoke
 the debugger).")
 
-(defparameter *max-debugging-threads* 5
-  "Maximum number of simultaneous active calls invoke-debuger")
-
-(defvar *debugging-threads* nil
-  "List debugged threads")
-
-(defvar *debugging-threads-lock* (make-lock "debugging threads lock")
-  "A global lock to prevent two threads from modifying *debugging-threads* at
-the same time")
-
 (defvar-unbound *acceptor*
   "The current ACCEPTOR object while in the context of a request.")
 





More information about the Bknr-cvs mailing list