[squeak-dev] The Inbox: Tools-ct.953.mcz

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Sun Mar 8 14:36:25 UTC 2020


Good question. It was already there in past, so I moved it ... From a - admittedtly - quite hypothetic view, it would be possible that some browser client would call the moveMethod stuff without checking the wantsDrop selector before ...


Best,

Christoph

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von K K Subbu <kksubbu.ml at gmail.com>
Gesendet: Sonntag, 8. März 2020 14:13:27
An: squeak-dev at lists.squeakfoundation.org
Betreff: Re: [squeak-dev] The Inbox: Tools-ct.953.mcz

On 07/03/20 3:10 PM, commits at source.squeak.org wrote:
  ----- Method: Browser>>moveMethod:shouldCopy:class:category: (in
category 'drag and drop') -----
> + moveMethod: method shouldCopy: shouldCopy class: destinationClass category: categoryOrBlock
> +
> +      | sourceClass areClassesRelated category |
> +      (method isKindOf: CompiledMethod)
> +              ifFalse: [^ self inform: 'Can only drop methods' translated].

Is the isKindOf: check required here? See below:

> + ----- Method: Browser>>wantsClassListDrop: (in category 'drag and drop') -----
> + wantsClassListDrop: anObject
> +
> +      ^ anObject isCompiledMethod!

Regards .. Subbu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200308/bf602415/attachment.html>


More information about the Squeak-dev mailing list