Silently ignore mono_gchandle_free(0) so callers do not have to check. (#8020)
commit9f499db1875c80764b42e630f74156d20dd2fca0
authorjaykrell <jay.krell@cornell.edu>
Thu, 5 Apr 2018 14:27:40 +0000 (5 07:27 -0700)
committerGitHub <noreply@github.com>
Thu, 5 Apr 2018 14:27:40 +0000 (5 07:27 -0700)
treef4fb3c08dc3575c30e5a81e69c6fced56a724f08
parenta5d0ab59ed653fd2f77271a5e9c0b496a015641c
Silently ignore mono_gchandle_free(0) so callers do not have to check. (#8020)

* [gc] Silently ignore mono_gchandle_free(0) so callers do not have to check.

* [threads] Take advantage of mono_gchandle_free(0) being nop (a few extra instructions
in dynamic path for when it is 0, same path length if it is not 0).

* [threads] Restore one if, it isn't clearly correct otherwise.
mono/metadata/boehm-gc.c
mono/metadata/null-gc-handles.c
mono/metadata/threads.c
mono/sgen/sgen-gchandles.c