[squeak-dev] The Trunk: Morphic-eem.1334.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Apr 11 18:28:16 UTC 2017


Eliot Miranda uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-eem.1334.mcz

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

Name: Morphic-eem.1334
Author: eem
Time: 11 April 2017, 11:27:47.032574 am
UUID: cd47b9b1-d13f-4c90-8aab-d1fbabd162e0
Ancestors: Morphic-cmm.1333

Fix a regression in Morphic-cmm.1333 which prevents a debugger opening while another is open.  One should never suspend the active process within a critical: block; doing so prevents the critical: block from completing and hence releasing its lock.  The fix is to pull the suspend out of the critical: block.

=============== Diff against Morphic-cmm.1333 ===============

Item was changed:
  ----- Method: Debugger class>>morphicOpenContext:label:contents: (in category '*Morphic-opening') -----
  morphicOpenContext: aContext label: aString contents: contentsStringOrNil 
  	"Open a notifier in response to an error, halt, or notify. A notifier view just shows a short view of the sender stack and provides a menu that lets the user open a full debugger."
  	"Simulation guard"
  	<primitive: 19>
  	ErrorRecursionGuard critical:
  		[ ErrorRecursion not & Preferences logDebuggerStackToFile ifTrue:
  			[ Smalltalk
  				logSqueakError: aString
  				inContext: aContext ].
  		ErrorRecursion ifTrue:
  			[ ErrorRecursion := false.
  			self primitiveError: aString ].
  		ErrorRecursion := true.
  		self
  			informExistingDebugger: aContext
  			label: aString.
  		(Debugger morphicContext: aContext)
  			openNotifierContents: contentsStringOrNil
  			label: aString.
+ 		ErrorRecursion := false].
+ 	Processor activeProcess suspend !
- 		ErrorRecursion := false.
- 		Processor activeProcess suspend ]!

Item was changed:
  ----- Method: Debugger class>>morphicOpenOn:context:label:contents:fullView: (in category '*Morphic-opening') -----
  morphicOpenOn: process context: context label: title contents: contentsStringOrNil fullView: full 
  	"Open a notifier in response to an error, halt, or notify. A notifier view just shows a short view of the sender stack and provides a menu that lets the user open a full debugger."
  	ErrorRecursionGuard critical:
  		[ | errorWasInUIProcess debugger |
  		ErrorRecursion ifTrue:
  			[ "self assert: process == Project current uiProcess -- DOCUMENTATION ONLY"
  			ErrorRecursion := false.
  			^ Project current handleFatalDrawingError: title ].
  		[ ErrorRecursion not & Preferences logDebuggerStackToFile ifTrue:
  			[ Smalltalk
  				logSqueakError: title
  				inContext: context ] ]
  			on: Error
  			do: [ : ex | ex return: nil ].
  		ErrorRecursion := true.
  		errorWasInUIProcess := Project current spawnNewProcessIfThisIsUI: process.
  		"Schedule debugging in deferred UI message because
  		1) If process is the current UI process, it is already broken.
  		2) If process is some other process, it must not execute UI code"
  		Project current addDeferredUIMessage:
  			[ debugger := self new
  				process: process
  				controller: nil
  				context: context.
  			full
  				ifTrue: [ debugger openFullNoSuspendLabel: title ]
  				ifFalse:
  					[ debugger
  						openNotifierContents: contentsStringOrNil
  						label: title ].
  			debugger errorWasInUIProcess: errorWasInUIProcess.
  			"Try drawing the debugger tool at least once to avoid freeze."
  			Project current world displayWorldSafely.
+ 			ErrorRecursion := false ]].
+ 	process suspend !
- 			ErrorRecursion := false ].
- 		process suspend ]!



More information about the Squeak-dev mailing list