Skip to content

Commit

Permalink
improve the minimal debugger termination logic a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
dalehenrich committed Aug 8, 2016
1 parent 82ae5f2 commit 424de5a
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
callbacks
actOnBrowserClosing: ann
self resuming
ifFalse: [ clientProcess terminate ]
ifFalse: [ self terminate ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
actions
clear
"If after resuming the process the user does plan to reuse this session with
the same process, it should call this method."
clientProcess := nil.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
actions
terminate

"Action that needs to be executed after the window containing this debug session is closed,
in order to terminate the right process."

clientProcess
ifNotNil: [
"Assume the user closed the debugger. Simply kill the interrupted process."
clientProcess terminate.
self clear.
Smalltalk installLowSpaceWatcher. "restart low space handler" ]
ifNil: [
"Assume the interrupted process was resumed."
"Kill the active process if the error was in the UI as there should be only one UI process."
self openedOnUIProcess
ifTrue: [Processor terminateActive] ]

Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
"class" : {
"example" : "dkh 4/30/2016 07:58" },
"instance" : {
"actOnBrowserClosing:" : "dkh 6/11/2016 12:47",
"actOnBrowserClosing:" : "dkh 8/7/2016 17:43",
"browser" : "dkh 4/23/2016 17:38",
"clear" : "dkh 8/7/2016 17:45",
"clearUserEditFlag" : "dkh 4/29/2016 14:12",
"close" : "dkh 4/28/2016 16:19",
"closeAndResume:" : "dkh 4/30/2016 06:54",
Expand Down Expand Up @@ -38,4 +39,5 @@
"sourceCode:" : "dkh 4/24/2016 15:46",
"stackDebuggingActions" : "dkh 4/27/2016 16:08",
"stackFrameListIn:" : "dkh 4/27/2016 10:17",
"terminate" : "dkh 8/7/2016 17:46",
"updateBrowser" : "dkh 4/25/2016 19:31" } }
Loading

0 comments on commit 424de5a

Please sign in to comment.