Files
swift-mirror/stdlib/public/runtime/ErrorObject.mm
tbkka 8c5e9850b8 Harden isKindOfClass: check (#35797)
* Harden `isKindOfClass:` check

We've seen some Obj-C NSProxy subclass implementations that are broken and will
crash if you send them a standard `isKindOfClass:` message.  This came out because
the casting machinery is now more aggressive about trying different casting options which
means some of these broken objects are being queried in new ways.

This adds an additional check before calling `isKindOfClass:` to verify that
this object is not using the default NSProxy selector routing.  If it is,
we just assume it's not whatever class is being tested for since we cannot
do anything better.

Resolves rdar://73799124

* Fixes from Mike Ash

* Fix build
2021-02-08 07:46:09 -08:00

24 KiB