The Trunk: Tools-jr.966.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Tools-jr.966.mcz

commits-2
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-jr.966.mcz

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

Name: Tools-jr.966
Author: jr
Time: 2 May 2020, 12:16:24.578946 am
UUID: eceadafb-7b97-1742-84a2-e714d188a3bb
Ancestors: Tools-mt.965

Avoid inlining of #class for proxies/decorators in Inspector.

The instance variables and indexed variables are accessed by sending a message to the inspected object, which probably passes through any transparent proxies. If the list of variables is just obtained from "object class" (which will not actually send a message to the object), the list will contain the variables of the proxy. Thus, there is a mismatch between the inspector's schema of the object (the fields) and the schema which is queried for values (the schema of the object behind the proxy).

Also send a message to find out the class, so it is aligned with how the values are retrieved.

Also mind this when initializing the styler.

=============== Diff against Tools-mt.965 ===============

Item was changed:
  ----- Method: Inspector>>streamInstanceVariablesOn: (in category 'fields - streaming') -----
  streamInstanceVariablesOn: aStream
 
+ (self object perform: #class "do not inline send of #class, receiver could be a proxy") allInstVarNames doWithIndex: [:name :index |
- self object class allInstVarNames doWithIndex: [:name :index |
  aStream nextPut: ((self newFieldForType: #instVar key: name)
  shouldStyleName: true;
  valueGetter: [:object | object instVarNamed: name];
  valueSetter: [:object :value | object instVarNamed: name put: value];
  yourself)].!

Item was changed:
  ----- Method: Inspector>>updateStyler:requestor: (in category 'user interface - styling') -----
  updateStyler: aStyler requestor: anObject
  "Use this method to update our fieldListStyler and all view stylers."
 
  aStyler
  environment: self environment;
+ classOrMetaClass: (self doItReceiver perform: #class "do not inline send of #class, receiver could be a proxy");
- classOrMetaClass: self doItReceiver class;
  context: self doItContext;
  parseAMethod: false.!