[squeak-dev] The Trunk: Tools-nice.116.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Aug 24 20:37:34 UTC 2009


Nicolas Cellier uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-nice.116.mcz

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

Name: Tools-nice.116
Author: nice
Time: 24 August 2009, 10:37:04 am
UUID: ae01292e-bc9f-4d79-a530-a6b5d28016cb
Ancestors: Tools-rkrk.115

Fix for http://bugs.squeak.org/view.php?id=6812
Inspecting a WeakSet will raise a Debugger
This is because field names were collected in a WeakSet and would die pretty soon...

=============== Diff against Tools-rkrk.115 ===============

Item was changed:
  ----- Method: WeakSetInspector>>fieldList (in category 'accessing') -----
  fieldList
+ 	| slotIndices |
  	object ifNil: [^ Set new].
+ 	
+ 	"Implementation note: do not use objectArray withIndexCollect: as super
+ 	because this might collect indices in a WeakArray, leading to constantly changing fieldList
+ 	as explained at http://bugs.squeak.org/view.php?id=6812"
+ 	
+ 	slotIndices := (Array new: object size) writeStream.
+ 	object array withIndexDo: [:each :i |
+ 		(each notNil and: [each ~= flagObject]) ifTrue: [slotIndices nextPut: i printString]].
+ 	
  	^ self baseFieldList
+ 		, slotIndices contents!
- 		, (object array
- 				withIndexCollect: [:each :i | (each notNil and: [each ~= flagObject]) ifTrue: [i printString]])
- 		  select: [:each | each notNil]!




More information about the Squeak-dev mailing list