File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Threading Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1717using MS . Internal . WindowsBase ; // SecurityHelper
1818using System . Threading ;
1919using System . ComponentModel ; // EditorBrowsableAttribute, BrowsableAttribute
20+ using System . Diagnostics . CodeAnalysis ;
21+ using System . Runtime . CompilerServices ;
2022
2123// Disabling 1634 and 1691:
2224// In order to avoid generating warnings about unknown message numbers and
@@ -222,7 +224,13 @@ public void VerifyAccess()
222224 {
223225 if ( ! CheckAccess ( ) )
224226 {
225- throw new InvalidOperationException ( SR . VerifyAccess ) ;
227+ // Used to inline VerifyAccess.
228+ [ DoesNotReturn ]
229+ [ MethodImpl ( MethodImplOptions . NoInlining ) ]
230+ static void ThrowVerifyAccess ( )
231+ => throw new InvalidOperationException ( SR . VerifyAccess ) ;
232+
233+ ThrowVerifyAccess ( ) ;
226234 }
227235 }
228236
You can’t perform that action at this time.
0 commit comments