Delete one-off AppDomain setter for uapaot first chance exception handler (dotnet...
authorJan Kotas <jkotas@microsoft.com>
Wed, 2 Jan 2019 13:31:06 +0000 (03:31 -1000)
committerStephen Toub <stoub@microsoft.com>
Wed, 2 Jan 2019 13:31:06 +0000 (08:31 -0500)
This should not be one-off. It should be either nowhere or everywhere.

Commit migrated from https://github.com/dotnet/corefx/commit/344aca842de08a897a560e3465f2885480a1e318

src/libraries/System.Runtime.Extensions/src/System/AppDomain.cs

index 1e8b202..09efa44 100644 (file)
@@ -67,13 +67,7 @@ namespace System
 
         public event EventHandler<FirstChanceExceptionEventArgs> FirstChanceException
         {
-            add
-            {
-#if uapaot
-                AppContext.SetAppDomain(this);
-#endif
-                AppContext.FirstChanceException += value;
-            }
+            add { AppContext.FirstChanceException += value; }
             remove { AppContext.FirstChanceException -= value; }
         }