[Pkg] The Trunk: Kernel-eem.876.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Sep 29 21:22:51 UTC 2014


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

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

Name: Kernel-eem.876
Author: eem
Time: 29 September 2014, 2:21:45.514 pm
UUID: 9ea5bea7-14c9-48c9-9d49-ca311d68d49a
Ancestors: Kernel-ul.875

Fix handleSignal: for a rare edge case that can
occur on Stack & Cog VMs.

=============== Diff against Kernel-ul.875 ===============

Item was changed:
  ----- Method: ContextPart>>handleSignal: (in category 'private-exceptions') -----
  handleSignal: exception
+ 	"Sent to handler (on:do:) contexts only.  If my exception class (first arg) handles exception
+ 	 and the handler is active then execute my handle block (second arg), otherwise forward
+ 	 this message to the next handler context.  If none left, execute exception's defaultAction
+ 	 (see nil>>handleSignal:)."
- 	"Sent to handler (on:do:) contexts only.  If my exception class (first arg) handles exception then execute my handle block (second arg), otherwise forward this message to the next handler context.  If none left, execute exception's defaultAction (see nil>>handleSignal:)."
  
+ 	| handlerActive val |
+ 	"If the context has been returned from the handlerActive temp var may not be accessible."
+ 	handlerActive := stackp >= 3 and: [(self tempAt: 3) == true].
+ 	(((self tempAt: 1) handles: exception) and: [handlerActive]) ifFalse:
+ 		[^self nextHandlerContext handleSignal: exception].
- 	| val |
- 	(((self tempAt: 1) handles: exception) and: [self tempAt: 3]) ifFalse: [
- 		^ self nextHandlerContext handleSignal: exception].
  
  	exception privHandlerContext: self contextTag.
  	self tempAt: 3 put: false.  "disable self while executing handle block"
+ 	val := [(self tempAt: 2) cull: exception]
+ 			ensure: [self tempAt: 3 put: true].
+ 	self return: val  "return from self if not otherwise directed in handle block"
- 	val := [(self tempAt: 2) cull: exception ]
- 		ensure: [self tempAt: 3 put: true].
- 	self return: val.  "return from self if not otherwise directed in handle block"
  !



More information about the Packages mailing list