Commit 6e52b9a
authored
* 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
1 parent 57d601f commit 6e52b9a
1 file changed
+21
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
545 | 565 | | |
546 | 566 | | |
547 | 567 | | |
| |||
550 | 570 | | |
551 | 571 | | |
552 | 572 | | |
553 | | - | |
554 | | - | |
| 573 | + | |
555 | 574 | | |
556 | 575 | | |
557 | 576 | | |
| |||
0 commit comments