From 7be467a6ce11d973335b07e595ba6fa006677fcf Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Thu, 12 May 2016 08:54:17 -0700 Subject: [PATCH] Fix desktop build [tfs-changeset: 1604234] Commit migrated from https://github.com/dotnet/coreclr/commit/a64342db509abbcce49b1a6e68c60fb550ef34b1 --- .../src/mscorlib/src/System/Threading/ExecutionContext.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/coreclr/src/mscorlib/src/System/Threading/ExecutionContext.cs b/src/coreclr/src/mscorlib/src/System/Threading/ExecutionContext.cs index 12c3ebb..b4213d2 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/ExecutionContext.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/ExecutionContext.cs @@ -339,11 +339,11 @@ namespace System.Threading #if FEATURE_CORRUPTING_EXCEPTIONS [HandleProcessCorruptedStateExceptions] #endif // FEATURE_CORRUPTING_EXCEPTIONS - internal bool UndoNoThrow() + internal bool UndoNoThrow(Thread currentThread) { try { - Undo(); + Undo(currentThread); } catch { @@ -354,7 +354,7 @@ namespace System.Threading [System.Security.SecurityCritical] // auto-generated [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] - internal void Undo() + internal void Undo(Thread currentThread) { // // Don't use an uninitialized switcher, or one that's already been used. @@ -363,7 +363,6 @@ namespace System.Threading return; // Don't do anything Contract.Assert(Thread.CurrentThread == this.thread); - Thread currentThread = this.thread; // // Restore the HostExecutionContext before restoring the ExecutionContext. @@ -1086,7 +1085,7 @@ namespace System.Threading } catch { - ecsw.UndoNoThrow(); + ecsw.UndoNoThrow(currentThread); throw; } return ecsw; -- 2.7.4