-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve the minimal debugger termination logic a bit
- Loading branch information
1 parent
82ae5f2
commit 424de5a
Showing
5 changed files
with
28 additions
and
3 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...-Minimal-Client-Debugger.package/TDMinimalDebugger.class/instance/actOnBrowserClosing..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ] |
5 changes: 5 additions & 0 deletions
5
repository/Tode-Minimal-Client-Debugger.package/TDMinimalDebugger.class/instance/clear.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
18 changes: 18 additions & 0 deletions
18
...sitory/Tode-Minimal-Client-Debugger.package/TDMinimalDebugger.class/instance/terminate.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] ] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.