[squeak-dev] The Inbox: Morphic-ct.1610.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Dec 16 10:53:10 UTC 2019


A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1610.mcz

==================== Summary ====================

Name: Morphic-ct.1610
Author: ct
Time: 16 December 2019, 11:52:56.435097 am
UUID: 37c022c9-73a9-0648-ba0a-2b1fe98f86ad
Ancestors: Morphic-mt.1608

Prevent infinite debugger chains in case of a failure while building the predebugger window. Complements System-ct.1130.

To reproduce, insert an error like "1/0" into Debugger >> #buildNotifierWith:label:message:.

=============== Diff against Morphic-mt.1608 ===============

Item was changed:
  ----- Method: MorphicDebugger class>>openOn:context:label:contents:fullView: (in category 'opening') -----
  openOn: processToDebug context: context label: title contents: contentsStringOrNil fullView: full 
  	
  	| debugger uiBlock |
  	debugger := self new
  		process: processToDebug context: context;
  		errorWasInUIProcess: (Project current spawnNewProcessIfThisIsUI: processToDebug).
  	
  	uiBlock := [
  		full
  			ifTrue: [debugger openFullNoSuspendLabel: title]
  			ifFalse: [debugger openNotifierNoSuspendContents: contentsStringOrNil label: title].
  	
  		"Try drawing the debugger tool at least once to avoid freeze."
  		debugger topView ifNotNil: [:window | window world displayWorld. "Not safely!!"].
  	].
  		
  	"Schedule debugging in a deferred UI message if necessary. Note that only the ui process should execute ui code."
  	(Project current uiProcess isActiveProcess not or: [processToDebug isActiveProcess])
+ 		ifTrue: [Project current addDeferredUIMessage: [
+ 			Processor activeProcess setErrorRecursionFlagDuring: uiBlock]]
- 		ifTrue: [Project current addDeferredUIMessage: uiBlock]
  		ifFalse: uiBlock.
  	
  	processToDebug suspend.
  	
  	"Get here only if active process is not the process-to-debug. So in tests, use a helper process if you want to access this return value."
  	^ debugger!



More information about the Squeak-dev mailing list