[AVFoundation] Remove unnecessary Equals/GetHashCode that caused crash (#8907) (#8911)

- Found in https://github.com/xamarin/xamarin-macios/issues/8882
- It turns out that https://github.com/xamarin/xamarin-macios/pull/8091 changed behavior so this:
	return (obj == null);
- Would call another equals which would call the original equals and it would repeat until stack overflow
- Missing manual tests tracked in https://github.com/xamarin/xamarin-macios/issues/8905
This commit is contained in:
Chris Hamons 2020-06-22 10:09:07 -05:00 коммит произвёл GitHub
Родитель 2525b21d23
Коммит a2027c5bcd
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 0 добавлений и 32 удалений

Просмотреть файл

@ -36,16 +36,6 @@ namespace AVFoundation {
}
}
public override bool Equals (object obj)
{
if (this == null){
return (obj == null);
}
if (!(obj is NSObject))
return false;
return IsEqual ((NSObject)obj);
}
public static bool operator == (AVAudioChannelLayout a, AVAudioChannelLayout b)
{
return a.Equals (b);
@ -55,11 +45,5 @@ namespace AVFoundation {
{
return !a.Equals (b);
}
public override int GetHashCode ()
{
return (int) ChannelCount;
}
}
}

Просмотреть файл

@ -12,16 +12,6 @@ using System.Runtime.CompilerServices;
namespace AVFoundation {
public partial class AVAudioFormat {
public override bool Equals (object obj)
{
if (this == null){
return (obj == null);
}
if (!(obj is NSObject))
return false;
return IsEqual ((NSObject)obj);
}
public static bool operator == (AVAudioFormat a, AVAudioFormat b)
{
return a.Equals (b);
@ -31,11 +21,5 @@ namespace AVFoundation {
{
return !a.Equals (b);
}
public override int GetHashCode ()
{
return (int) ChannelCount;
}
}
}