From b667080ba2a8ac6874cea0ba97810e90e2ac9824 Mon Sep 17 00:00:00 2001 From: Steve Harter Date: Sun, 3 Apr 2022 11:59:27 -0500 Subject: [PATCH] Revert previous EntryPointNotFoundException; modify test --- .../src/System/Reflection/Emit/DynamicMethod.cs | 5 ----- .../src/System/Reflection/RuntimeConstructorInfo.CoreCLR.cs | 5 ----- .../src/System/Reflection/RuntimeMethodInfo.CoreCLR.cs | 5 ----- src/tests/reflection/DefaultInterfaceMethods/Emit.cs | 4 ++-- .../reflection/DefaultInterfaceMethods/InvokeConsumer.cs | 3 ++- 5 files changed, 4 insertions(+), 18 deletions(-) diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs index ea71e6919ff67..6b5e67602f90a 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs @@ -588,11 +588,6 @@ Signature LazyCreateSignature() { return RuntimeMethodHandle.InvokeMethod(obj, (void**)arguments, Signature, isConstructor: false); } - catch (EntryPointNotFoundException) - { - // Don't wrap since the exception did not originate from within the method. - throw; - } catch (Exception e) { throw new TargetInvocationException(e); diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeConstructorInfo.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeConstructorInfo.CoreCLR.cs index d868f50fe16d6..35e14b8ebfee4 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeConstructorInfo.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeConstructorInfo.CoreCLR.cs @@ -106,11 +106,6 @@ internal unsafe object InvokeNonEmitUnsafe(object? obj, IntPtr* args, Span