[squeak-dev] The Inbox: Kernel-jar.1395.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Apr 29 22:25:22 UTC 2021


A new version of Kernel was added to project The Inbox:
http://source.squeak.org/inbox/Kernel-jar.1395.mcz

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

Name: Kernel-jar.1395
Author: jar
Time: 30 April 2021, 12:25:17.561362 am
UUID: 0f589a20-6b8e-a94b-9dbc-9b3f91c84ce8
Ancestors: Kernel-nice.1394

Fix a bug in Exception>>#outer causing a return to an incorrect handler context. Explanation in: http://forum.world.st/A-bug-in-Exception-gt-gt-outer-causing-a-return-to-an-incorrect-handler-context-td5129273.html

=============== Diff against Kernel-nice.1394 ===============

Item was changed:
  ----- Method: Exception>>outer (in category 'handling') -----
  outer
  	"Evaluate the enclosing exception action and return to here instead of signal if it resumes (see #resumeUnchecked:)."
  
+ 	| prevOuterContext currHandlerContext |
- 	| prevOuterContext |
  	self isResumable ifTrue: [
+ 		currHandlerContext := handlerContext.
  		prevOuterContext := outerContext.
  		outerContext := thisContext contextTag.
  	].
  	self pass.
  !

Item was changed:
  ----- Method: Exception>>resumeUnchecked: (in category 'handling') -----
  resumeUnchecked: resumptionValue
  	"Return resumptionValue as the value of #signal, unless this was called after an #outer message, then return resumptionValue as the value of #outer."
  
  	| ctxt |
  	outerContext ifNil: [
  		signalContext return: resumptionValue
  	] ifNotNil: [
  		ctxt := outerContext.
  		outerContext := ctxt tempAt: 1. "prevOuterContext in #outer"
+ 		handlerContext := ctxt tempAt: 2. "currHandlerContext in #outer"
  		ctxt return: resumptionValue
  	].
  !



More information about the Squeak-dev mailing list